FST  openfst-1.8.3
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 ()=default
 
 FstImpl (const FstImpl< CacheStore::State::Arc > &impl)
 
 FstImpl (FstImpl< CacheStore::State::Arc > &&impl) noexcept
 
virtual ~FstImpl ()=default
 
FstImploperator= (const FstImpl &impl)
 
FstImploperator= (FstImpl &&impl) noexcept
 
const std::string & Type () const
 
void SetType (std::string_view type)
 
virtual uint64_t Properties () const
 
virtual uint64_t Properties (uint64_t mask) const
 
void SetProperties (uint64_t props)
 
void SetProperties (uint64_t props, uint64_t mask)
 
void SetProperties (uint64_t props, uint64_t mask) const
 
void UpdateProperties (uint64_t props, uint64_t 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, std::string_view type, uint64_t properties, FstHeader *hdr)
 
static bool UpdateFstHeader (const Fst< CacheStore::State::Arc > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, std::string_view type, uint64_t properties, FstHeader *hdr, size_t header_offset)
 

Static Public Attributes

static constexpr uint64_t 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< uint64_t > properties_
 

Detailed Description

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

Definition at line 855 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 860 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 869 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 859 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 858 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 878 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 889 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 911 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 921 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 934 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 1061 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 980 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 1037 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 951 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 1046 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 1032 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 1027 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 1047 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 962 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 968 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 974 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 957 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 997 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 1049 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 1048 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 946 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 1015 of file compact-fst.h.

Member Data Documentation

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

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


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