Public Types | Public Member Functions

fst::UniformArcSelector< A > Struct Template Reference

Randomly selects a transition using the uniform distribution. More...

#include <fst/randgen.h>

List of all members.

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

Detailed Description

template<class A>
struct fst::UniformArcSelector< A >

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.


Member Typedef Documentation

template<class A>
typedef A::StateId fst::UniformArcSelector< A >::StateId

Definition at line 46 of file randgen.h.

template<class A>
typedef A::Weight fst::UniformArcSelector< A >::Weight

Definition at line 47 of file randgen.h.


Constructor & Destructor Documentation

template<class A>
fst::UniformArcSelector< A >::UniformArcSelector ( int  seed = time(0)  )  [inline]

Definition at line 49 of file randgen.h.


Member Function Documentation

template<class A>
size_t fst::UniformArcSelector< A >::operator() ( const Fst< A > &  fst,
StateId  s 
) const [inline]

Definition at line 51 of file randgen.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines