FST  openfst-1.7.0
OpenFst Library
Public Types | Public Member Functions | List of all members
fst::ArcSampler< Arc, Selector > Class Template Reference

#include <randgen.h>

Public Types

using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 

Public Member Functions

 ArcSampler (const Fst< Arc > &fst, const Selector &selector, int32 max_length=std::numeric_limits< int32 >::max())
 
 ArcSampler (const ArcSampler< Arc, Selector > &sampler, const Fst< Arc > *fst=nullptr)
 
bool Sample (const RandState< Arc > &rstate)
 
bool Done () const
 
void Next ()
 
std::pair< size_t, size_t > Value () const
 
void Reset ()
 
bool Error () const
 

Detailed Description

template<class Arc, class Selector>
class fst::ArcSampler< Arc, Selector >

Definition at line 177 of file randgen.h.

Member Typedef Documentation

template<class Arc, class Selector>
using fst::ArcSampler< Arc, Selector >::StateId = typename Arc::StateId

Definition at line 179 of file randgen.h.

template<class Arc, class Selector>
using fst::ArcSampler< Arc, Selector >::Weight = typename Arc::Weight

Definition at line 180 of file randgen.h.

Constructor & Destructor Documentation

template<class Arc, class Selector>
fst::ArcSampler< Arc, Selector >::ArcSampler ( const Fst< Arc > &  fst,
const Selector &  selector,
int32  max_length = std::numeric_limits<int32>::max() 
)
inline

Definition at line 184 of file randgen.h.

template<class Arc, class Selector>
fst::ArcSampler< Arc, Selector >::ArcSampler ( const ArcSampler< Arc, Selector > &  sampler,
const Fst< Arc > *  fst = nullptr 
)
inline

Definition at line 189 of file randgen.h.

Member Function Documentation

template<class Arc, class Selector>
bool fst::ArcSampler< Arc, Selector >::Done ( ) const
inline

Definition at line 219 of file randgen.h.

template<class Arc, class Selector>
bool fst::ArcSampler< Arc, Selector >::Error ( ) const
inline

Definition at line 228 of file randgen.h.

template<class Arc, class Selector>
void fst::ArcSampler< Arc, Selector >::Next ( )
inline

Definition at line 222 of file randgen.h.

template<class Arc, class Selector>
void fst::ArcSampler< Arc, Selector >::Reset ( )
inline

Definition at line 226 of file randgen.h.

template<class Arc, class Selector>
bool fst::ArcSampler< Arc, Selector >::Sample ( const RandState< Arc > &  rstate)
inline

Definition at line 203 of file randgen.h.

template<class Arc, class Selector>
std::pair<size_t, size_t> fst::ArcSampler< Arc, Selector >::Value ( ) const
inline

Definition at line 224 of file randgen.h.


The documentation for this class was generated from the following file: