FST  openfst-1.7.1
OpenFst Library
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
fst::internal::CompactFstImpl< Arc, C, CacheStore > Class Template Reference

#include <compact-fst.h>

Inheritance diagram for fst::internal::CompactFstImpl< Arc, C, CacheStore >:
Inheritance graph
[legend]
Collaboration diagram for fst::internal::CompactFstImpl< Arc, C, CacheStore >:
Collaboration graph
[legend]

Public Types

using Weight = typename Arc::Weight
 
using StateId = typename Arc::StateId
 
using Compactor = C
 
using ImplBase = CacheBaseImpl< typename CacheStore::State, CacheStore >
 
- Public Types inherited from fst::internal::CacheBaseImpl< CacheStore::State, CacheStore >
using Arc = typename CacheStore::State::Arc
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
using Store = CacheStore
 
- Public Types inherited from fst::internal::FstImpl< CacheStore::State::Arc >
using StateId = typename CacheStore::State::Arc::StateId
 
using Weight = typename CacheStore::State::Arc::Weight
 

Public Member Functions

 CompactFstImpl ()
 
 CompactFstImpl (const Fst< Arc > &fst, std::shared_ptr< Compactor > compactor, const CompactFstOptions &opts)
 
 CompactFstImpl (std::shared_ptr< Compactor > compactor, const CompactFstOptions &opts)
 
 CompactFstImpl (const CompactFstImpl< Arc, Compactor, CacheStore > &impl)
 
template<class OtherCacheStore >
 CompactFstImpl (const CompactFstImpl< Arc, Compactor, OtherCacheStore > &impl)
 
StateId Start ()
 
Weight Final (StateId s)
 
StateId NumStates () const
 
size_t NumArcs (StateId s)
 
size_t NumInputEpsilons (StateId s)
 
size_t NumOutputEpsilons (StateId s)
 
size_t CountEpsilons (StateId s, bool output_epsilons)
 
bool Write (std::ostream &strm, const FstWriteOptions &opts) const
 
void InitStateIterator (StateIteratorData< Arc > *data) const
 
void InitArcIterator (StateId s, ArcIteratorData< Arc > *data)
 
void Expand (StateId s)
 
const CompactorGetCompactor () const
 
std::shared_ptr< CompactorSharedCompactor () const
 
void SetCompactor (std::shared_ptr< Compactor > compactor)
 
- Public Member Functions inherited from fst::internal::CacheBaseImpl< CacheStore::State, CacheStore >
 CacheBaseImpl (const CacheOptions &opts=CacheOptions())
 
 CacheBaseImpl (const CacheImplOptions< CacheStore > &opts)
 
 CacheBaseImpl (const CacheBaseImpl< CacheStore::State, CacheStore > &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 CacheStore * GetCacheStore () const
 
CacheStore * GetCacheStore ()
 
bool GetCacheGc () const
 
size_t GetCacheLimit () const
 
- Public Member Functions inherited from fst::internal::FstImpl< CacheStore::State::Arc >
 FstImpl ()
 
 FstImpl (const FstImpl< CacheStore::State::Arc > &impl)
 
 FstImpl (FstImpl< CacheStore::State::Arc > &&impl) noexcept
 
virtual ~FstImpl ()
 
FstImploperator= (const FstImpl< CacheStore::State::Arc > &impl)
 
FstImploperator= (FstImpl< CacheStore::State::Arc > &&impl) noexcept
 
const string & Type () const
 
void SetType (const string &type)
 
virtual uint64 Properties () const
 
virtual uint64 Properties (uint64 mask) const
 
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
 

Static Public Member Functions

static CompactFstImpl< Arc, Compactor, CacheStore > * Read (std::istream &strm, const FstReadOptions &opts)
 
- Static Public Member Functions inherited from fst::internal::FstImpl< CacheStore::State::Arc >
static void WriteFstHeader (const Fst< CacheStore::State::Arc > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, const string &type, uint64 properties, FstHeader *hdr)
 
static bool UpdateFstHeader (const Fst< CacheStore::State::Arc > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, const string &type, uint64 properties, FstHeader *hdr, size_t header_offset)
 

Static Public Attributes

static constexpr uint64 kStaticProperties = kExpanded
 

Protected Member Functions

template<class OtherArc , class OtherCompactor , class OtherCacheStore >
 CompactFstImpl (const CompactFstImpl< OtherArc, OtherCompactor, OtherCacheStore > &impl)
 

Friends

template<class AnyArc , class ArcCompactor , class Unsigned , class CompactStore , class AnyCacheStore >
class ::fst::CompactFst
 

Additional Inherited Members

- Protected Attributes inherited from fst::internal::FstImpl< CacheStore::State::Arc >
uint64 properties_
 

Detailed Description

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
class fst::internal::CompactFstImpl< Arc, C, CacheStore >

Definition at line 738 of file compact-fst.h.

Member Typedef Documentation

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
using fst::internal::CompactFstImpl< Arc, C, CacheStore >::Compactor = C

Definition at line 743 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
using fst::internal::CompactFstImpl< Arc, C, CacheStore >::ImplBase = CacheBaseImpl<typename CacheStore::State, CacheStore>

Definition at line 752 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
using fst::internal::CompactFstImpl< Arc, C, CacheStore >::StateId = typename Arc::StateId

Definition at line 742 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
using fst::internal::CompactFstImpl< Arc, C, CacheStore >::Weight = typename Arc::Weight

Definition at line 741 of file compact-fst.h.

Constructor & Destructor Documentation

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
fst::internal::CompactFstImpl< Arc, C, CacheStore >::CompactFstImpl ( )
inline

Definition at line 761 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
fst::internal::CompactFstImpl< Arc, C, CacheStore >::CompactFstImpl ( const Fst< Arc > &  fst,
std::shared_ptr< Compactor compactor,
const CompactFstOptions opts 
)
inline

Definition at line 768 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
fst::internal::CompactFstImpl< Arc, C, CacheStore >::CompactFstImpl ( std::shared_ptr< Compactor compactor,
const CompactFstOptions opts 
)
inline

Definition at line 789 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
fst::internal::CompactFstImpl< Arc, C, CacheStore >::CompactFstImpl ( const CompactFstImpl< Arc, Compactor, CacheStore > &  impl)
inline

Definition at line 798 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
template<class OtherCacheStore >
fst::internal::CompactFstImpl< Arc, C, CacheStore >::CompactFstImpl ( const CompactFstImpl< Arc, Compactor, OtherCacheStore > &  impl)
inline

Definition at line 811 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
template<class OtherArc , class OtherCompactor , class OtherCacheStore >
fst::internal::CompactFstImpl< Arc, C, CacheStore >::CompactFstImpl ( const CompactFstImpl< OtherArc, OtherCompactor, OtherCacheStore > &  impl)
inlineexplicitprotected

Definition at line 935 of file compact-fst.h.

Member Function Documentation

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
size_t fst::internal::CompactFstImpl< Arc, C, CacheStore >::CountEpsilons ( StateId  s,
bool  output_epsilons 
)
inline

Definition at line 856 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
void fst::internal::CompactFstImpl< Arc, C, CacheStore >::Expand ( StateId  s)
inline

Definition at line 913 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
Weight fst::internal::CompactFstImpl< Arc, C, CacheStore >::Final ( StateId  s)
inline

Definition at line 827 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
const Compactor* fst::internal::CompactFstImpl< Arc, C, CacheStore >::GetCompactor ( ) const
inline

Definition at line 921 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
void fst::internal::CompactFstImpl< Arc, C, CacheStore >::InitArcIterator ( StateId  s,
ArcIteratorData< Arc > *  data 
)
inline

Definition at line 908 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
void fst::internal::CompactFstImpl< Arc, C, CacheStore >::InitStateIterator ( StateIteratorData< Arc > *  data) const
inline

Definition at line 903 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
size_t fst::internal::CompactFstImpl< Arc, C, CacheStore >::NumArcs ( StateId  s)
inline

Definition at line 838 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
size_t fst::internal::CompactFstImpl< Arc, C, CacheStore >::NumInputEpsilons ( StateId  s)
inline

Definition at line 844 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
size_t fst::internal::CompactFstImpl< Arc, C, CacheStore >::NumOutputEpsilons ( StateId  s)
inline

Definition at line 850 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
StateId fst::internal::CompactFstImpl< Arc, C, CacheStore >::NumStates ( ) const
inline

Definition at line 833 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
static CompactFstImpl<Arc, Compactor, CacheStore>* fst::internal::CompactFstImpl< Arc, C, CacheStore >::Read ( std::istream &  strm,
const FstReadOptions opts 
)
inlinestatic

Definition at line 871 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
void fst::internal::CompactFstImpl< Arc, C, CacheStore >::SetCompactor ( std::shared_ptr< Compactor compactor)
inline

Definition at line 923 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
std::shared_ptr<Compactor> fst::internal::CompactFstImpl< Arc, C, CacheStore >::SharedCompactor ( ) const
inline

Definition at line 922 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
StateId fst::internal::CompactFstImpl< Arc, C, CacheStore >::Start ( )
inline

Definition at line 822 of file compact-fst.h.

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
bool fst::internal::CompactFstImpl< Arc, C, CacheStore >::Write ( std::ostream &  strm,
const FstWriteOptions opts 
) const
inline

Definition at line 891 of file compact-fst.h.

Friends And Related Function Documentation

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
template<class AnyArc , class ArcCompactor , class Unsigned , class CompactStore , class AnyCacheStore >
friend class ::fst::CompactFst
friend

Definition at line 948 of file compact-fst.h.

Member Data Documentation

template<class Arc, class C, class CacheStore = DefaultCacheStore<Arc>>
constexpr uint64 fst::internal::CompactFstImpl< Arc, Compactor, CacheStore >::kStaticProperties = kExpanded
static

Definition at line 931 of file compact-fst.h.


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