FST  openfst-1.7.1
OpenFst Library
Public Types | Public Member Functions | List of all members
fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler > Class Template Reference

#include <randgen.h>

Inheritance diagram for fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >:
Inheritance graph
[legend]
Collaboration diagram for fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >:
Collaboration graph
[legend]

Public Types

using Label = typename FromArc::Label
 
using StateId = typename FromArc::StateId
 
using FromWeight = typename FromArc::Weight
 
using ToWeight = typename ToArc::Weight
 
- Public Types inherited from fst::internal::CacheImpl< ToArc >
using State = CacheState< ToArc >
 
- Public Types inherited from fst::internal::CacheBaseImpl< CacheState< ToArc > >
using Arc = typename CacheState< ToArc >::Arc
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
using Store = DefaultCacheStore< typename CacheState< ToArc >::Arc >
 
- Public Types inherited from fst::internal::FstImpl< CacheState< ToArc >::Arc >
using StateId = typename CacheState< ToArc >::Arc::StateId
 
using Weight = typename CacheState< ToArc >::Arc::Weight
 

Public Member Functions

 RandGenFstImpl (const Fst< FromArc > &fst, const RandGenFstOptions< Sampler > &opts)
 
 RandGenFstImpl (const RandGenFstImpl &impl)
 
StateId Start ()
 
ToWeight Final (StateId s)
 
size_t NumArcs (StateId s)
 
size_t NumInputEpsilons (StateId s)
 
size_t NumOutputEpsilons (StateId s)
 
uint64 Properties () const override
 
uint64 Properties (uint64 mask) const override
 
void InitArcIterator (StateId s, ArcIteratorData< ToArc > *data)
 
void Expand (StateId s)
 
- Public Member Functions inherited from fst::internal::CacheImpl< ToArc >
 CacheImpl ()
 
 CacheImpl (const CacheOptions &opts)
 
 CacheImpl (const CacheImpl< ToArc > &impl, bool preserve_cache=false)
 
- Public Member Functions inherited from fst::internal::CacheBaseImpl< CacheState< ToArc > >
 CacheBaseImpl (const CacheOptions &opts=CacheOptions())
 
 CacheBaseImpl (const CacheImplOptions< DefaultCacheStore< typename CacheState< ToArc >::Arc > > &opts)
 
 CacheBaseImpl (const CacheBaseImpl< CacheState< ToArc >, DefaultCacheStore< typename CacheState< ToArc >::Arc > > &impl, bool preserve_cache=false)
 
 ~CacheBaseImpl () override
 
void SetStart (StateId s)
 
void SetFinal (StateId s, Weight weight)
 
void PushArc (StateId s, const Arc &arc)
 
void PushArc (StateId s, Arc &&arc)
 
void EmplaceArc (StateId s, T &&...ctor_args)
 
void SetArcs (StateId s)
 
void ReserveArcs (StateId s, size_t n)
 
void DeleteArcs (StateId s)
 
void DeleteArcs (StateId s, size_t n)
 
void Clear ()
 
bool HasStart () const
 
bool HasFinal (StateId s) const
 
bool HasArcs (StateId s) const
 
StateId Start () const
 
Weight Final (StateId s) const
 
size_t NumArcs (StateId s) const
 
size_t NumInputEpsilons (StateId s) const
 
size_t NumOutputEpsilons (StateId s) const
 
void InitArcIterator (StateId s, ArcIteratorData< Arc > *data) const
 
StateId NumKnownStates () const
 
void UpdateNumKnownStates (StateId s)
 
StateId MinUnexpandedState () const
 
StateId MaxExpandedState () const
 
void SetExpandedState (StateId s)
 
bool ExpandedState (StateId s) const
 
const DefaultCacheStore< typename CacheState< ToArc >::Arc > * GetCacheStore () const
 
DefaultCacheStore< typename CacheState< ToArc >::Arc > * GetCacheStore ()
 
bool GetCacheGc () const
 
size_t GetCacheLimit () const
 
- Public Member Functions inherited from fst::internal::FstImpl< CacheState< ToArc >::Arc >
 FstImpl ()
 
 FstImpl (const FstImpl< CacheState< ToArc >::Arc > &impl)
 
 FstImpl (FstImpl< CacheState< ToArc >::Arc > &&impl) noexcept
 
virtual ~FstImpl ()
 
FstImploperator= (const FstImpl< CacheState< ToArc >::Arc > &impl)
 
FstImploperator= (FstImpl< CacheState< ToArc >::Arc > &&impl) noexcept
 
const string & Type () const
 
void SetType (const string &type)
 
void SetProperties (uint64 props)
 
void SetProperties (uint64 props, uint64 mask)
 
void SetProperties (uint64 props, uint64 mask) const
 
const SymbolTableInputSymbols () const
 
SymbolTableInputSymbols ()
 
const SymbolTableOutputSymbols () const
 
SymbolTableOutputSymbols ()
 
void SetInputSymbols (const SymbolTable *isyms)
 
void SetOutputSymbols (const SymbolTable *osyms)
 
bool ReadHeader (std::istream &strm, const FstReadOptions &opts, int min_version, FstHeader *hdr)
 
void WriteHeader (std::ostream &strm, const FstWriteOptions &opts, int version, FstHeader *hdr) const
 

Additional Inherited Members

- Static Public Member Functions inherited from fst::internal::FstImpl< CacheState< ToArc >::Arc >
static void WriteFstHeader (const Fst< CacheState< ToArc >::Arc > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, const string &type, uint64 properties, FstHeader *hdr)
 
static bool UpdateFstHeader (const Fst< CacheState< ToArc >::Arc > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, const string &type, uint64 properties, FstHeader *hdr, size_t header_offset)
 
- Protected Attributes inherited from fst::internal::FstImpl< CacheState< ToArc >::Arc >
uint64 properties_
 

Detailed Description

template<class FromArc, class ToArc, class Sampler>
class fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >

Definition at line 390 of file randgen.h.

Member Typedef Documentation

template<class FromArc , class ToArc , class Sampler >
using fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::FromWeight = typename FromArc::Weight

Definition at line 407 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
using fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::Label = typename FromArc::Label

Definition at line 405 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
using fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::StateId = typename FromArc::StateId

Definition at line 406 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
using fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::ToWeight = typename ToArc::Weight

Definition at line 409 of file randgen.h.

Constructor & Destructor Documentation

template<class FromArc , class ToArc , class Sampler >
fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::RandGenFstImpl ( const Fst< FromArc > &  fst,
const RandGenFstOptions< Sampler > &  opts 
)
inline

Definition at line 411 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::RandGenFstImpl ( const RandGenFstImpl< FromArc, ToArc, Sampler > &  impl)
inline

Definition at line 428 of file randgen.h.

Member Function Documentation

template<class FromArc , class ToArc , class Sampler >
void fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::Expand ( StateId  s)
inline

Definition at line 490 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
ToWeight fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::Final ( StateId  s)
inline

Definition at line 452 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
void fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::InitArcIterator ( StateId  s,
ArcIteratorData< ToArc > *  data 
)
inline

Definition at line 483 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
size_t fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::NumArcs ( StateId  s)
inline

Definition at line 457 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
size_t fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::NumInputEpsilons ( StateId  s)
inline

Definition at line 462 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
size_t fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::NumOutputEpsilons ( StateId  s)
inline

Definition at line 467 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
uint64 fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::Properties ( ) const
inlineoverridevirtual

Reimplemented from fst::internal::FstImpl< CacheState< ToArc >::Arc >.

Definition at line 472 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
uint64 fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::Properties ( uint64  mask) const
inlineoverridevirtual

Reimplemented from fst::internal::FstImpl< CacheState< ToArc >::Arc >.

Definition at line 475 of file randgen.h.

template<class FromArc , class ToArc , class Sampler >
StateId fst::internal::RandGenFstImpl< FromArc, ToArc, Sampler >::Start ( )
inline

Definition at line 441 of file randgen.h.


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