FST  openfst-1.8.3
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_t max_length=std::numeric_limits< int32_t >::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 203 of file randgen.h.

Member Typedef Documentation

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

Definition at line 205 of file randgen.h.

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

Definition at line 206 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_t  max_length = std::numeric_limits<int32_t>::max() 
)
inline

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

Member Function Documentation

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

Definition at line 245 of file randgen.h.

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

Definition at line 254 of file randgen.h.

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

Definition at line 248 of file randgen.h.

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

Definition at line 252 of file randgen.h.

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

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


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