FST  openfst-1.7.7
OpenFst Library
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | 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 &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
 
CompactorMutableCompactor ()
 
std::shared_ptr< CompactorSharedCompactor ()
 
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=Weight::One())
 
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 &impl)
 
FstImploperator= (FstImpl &&impl) noexcept
 
const std::string & Type () const
 
void SetType (const std::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
 
void UpdateProperties (uint64 props, uint64 mask)
 
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 CompactFstImplRead (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 std::string &type, uint64 properties, FstHeader *hdr)
 
static bool UpdateFstHeader (const Fst< CacheStore::State::Arc > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, const std::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)
 

Additional Inherited Members

- Protected Attributes inherited from fst::internal::FstImpl< CacheStore::State::Arc >
std::atomic< uint64properties_
 

Detailed Description

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

Definition at line 828 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 833 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 842 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 832 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 831 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 851 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 862 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 883 of file compact-fst.h.

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

Definition at line 893 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)
inlineexplicit

Definition at line 906 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 1033 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 952 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 1009 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 923 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 1018 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 1004 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 999 of file compact-fst.h.

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

Definition at line 1019 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 934 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 940 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 946 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 929 of file compact-fst.h.

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

Definition at line 969 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 1021 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 ( )
inline

Definition at line 1020 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 918 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 987 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 1029 of file compact-fst.h.


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