Randomly selects a transition using the uniform distribution. More...
#include <fst/randgen.h>
Public Types | |
| typedef A::StateId | StateId |
| typedef A::Weight | Weight |
Public Member Functions | |
| UniformArcSelector (int seed=time(0)) | |
| size_t | operator() (const Fst< A > &fst, StateId s) const |
Randomly selects a transition using the uniform distribution.
ARC SELECTORS - these function objects are used to select a random transition to take from an FST's state. They should return a number N s.t. 0 <= N <= NumArcs(). If N < NumArcs(), then the N-th transition is selected. If N == NumArcs(), then the final weight at that state is selected (i.e., the 'super-final' transition is selected). It can be assumed these will not be called unless either there are transitions leaving the state and/or the state is final.
Definition at line 45 of file randgen.h.
| typedef A::StateId fst::UniformArcSelector< A >::StateId |
| typedef A::Weight fst::UniformArcSelector< A >::Weight |
| fst::UniformArcSelector< A >::UniformArcSelector | ( | int | seed = time(0) |
) | [inline] |
| size_t fst::UniformArcSelector< A >::operator() | ( | const Fst< A > & | fst, | |
| StateId | s | |||
| ) | const [inline] |
1.7.1