FST  openfst-1.7.2
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 186 of file randgen.h.

Member Typedef Documentation

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

Definition at line 188 of file randgen.h.

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

Definition at line 189 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 193 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 198 of file randgen.h.

Member Function Documentation

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

Definition at line 228 of file randgen.h.

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

Definition at line 237 of file randgen.h.

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

Definition at line 231 of file randgen.h.

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

Definition at line 235 of file randgen.h.

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

Definition at line 212 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 233 of file randgen.h.


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