FST  openfst-1.8.3
OpenFst Library
Public Types | Public Member Functions | List of all members
fst::internal::CacheBaseImpl< State, CacheStore > Class Template Reference

#include <cache.h>

Inheritance diagram for fst::internal::CacheBaseImpl< State, CacheStore >:
Inheritance graph
[legend]
Collaboration diagram for fst::internal::CacheBaseImpl< State, CacheStore >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 CacheBaseImpl (const CacheOptions &opts=CacheOptions())
 
 CacheBaseImpl (const CacheImplOptions< CacheStore > &opts)
 
 CacheBaseImpl (const CacheBaseImpl< 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)
 
template<class... T>
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< State::Arc >
 FstImpl ()=default
 
 FstImpl (const FstImpl< State::Arc > &impl)
 
 FstImpl (FstImpl< 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
 

Additional Inherited Members

- Static Public Member Functions inherited from fst::internal::FstImpl< State::Arc >
static void WriteFstHeader (const Fst< 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< State::Arc > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, std::string_view type, uint64_t properties, FstHeader *hdr, size_t header_offset)
 
- Protected Attributes inherited from fst::internal::FstImpl< State::Arc >
std::atomic< uint64_t > properties_
 

Detailed Description

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
class fst::internal::CacheBaseImpl< State, CacheStore >

Definition at line 857 of file cache.h.

Member Typedef Documentation

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

Definition at line 859 of file cache.h.

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

Definition at line 860 of file cache.h.

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

Definition at line 863 of file cache.h.

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

Definition at line 861 of file cache.h.

Constructor & Destructor Documentation

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
fst::internal::CacheBaseImpl< State, CacheStore >::CacheBaseImpl ( const CacheOptions opts = CacheOptions())
inlineexplicit

Definition at line 868 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
fst::internal::CacheBaseImpl< State, CacheStore >::CacheBaseImpl ( const CacheImplOptions< CacheStore > &  opts)
inlineexplicit

Definition at line 880 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
fst::internal::CacheBaseImpl< State, CacheStore >::CacheBaseImpl ( const CacheBaseImpl< State, CacheStore > &  impl,
bool  preserve_cache = false 
)
inline

Definition at line 896 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
fst::internal::CacheBaseImpl< State, CacheStore >::~CacheBaseImpl ( )
inlineoverride

Definition at line 920 of file cache.h.

Member Function Documentation

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::Clear ( )
inline

Definition at line 989 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::DeleteArcs ( StateId  s)
inline

Definition at line 979 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::DeleteArcs ( StateId  s,
size_t  n 
)
inline

Definition at line 984 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
template<class... T>
void fst::internal::CacheBaseImpl< State, CacheStore >::EmplaceArc ( StateId  s,
T &&...  ctor_args 
)
inline

Definition at line 954 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
bool fst::internal::CacheBaseImpl< State, CacheStore >::ExpandedState ( StateId  s) const
inline

Definition at line 1089 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
Weight fst::internal::CacheBaseImpl< State, CacheStore >::Final ( StateId  s) const
inline

Definition at line 1028 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
bool fst::internal::CacheBaseImpl< State, CacheStore >::GetCacheGc ( ) const
inline

Definition at line 1107 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
size_t fst::internal::CacheBaseImpl< State, CacheStore >::GetCacheLimit ( ) const
inline

Definition at line 1109 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
const CacheStore* fst::internal::CacheBaseImpl< State, CacheStore >::GetCacheStore ( ) const
inline

Definition at line 1101 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
CacheStore* fst::internal::CacheBaseImpl< State, CacheStore >::GetCacheStore ( )
inline

Definition at line 1103 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
bool fst::internal::CacheBaseImpl< State, CacheStore >::HasArcs ( StateId  s) const
inline

Definition at line 1016 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
bool fst::internal::CacheBaseImpl< State, CacheStore >::HasFinal ( StateId  s) const
inline

Definition at line 1005 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
bool fst::internal::CacheBaseImpl< State, CacheStore >::HasStart ( ) const
inline

Definition at line 999 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::InitArcIterator ( StateId  s,
ArcIteratorData< Arc > *  data 
) const
inline

Definition at line 1049 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
StateId fst::internal::CacheBaseImpl< State, CacheStore >::MaxExpandedState ( ) const
inline

Definition at line 1076 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
StateId fst::internal::CacheBaseImpl< State, CacheStore >::MinUnexpandedState ( ) const
inline

Definition at line 1067 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
size_t fst::internal::CacheBaseImpl< State, CacheStore >::NumArcs ( StateId  s) const
inline

Definition at line 1033 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
size_t fst::internal::CacheBaseImpl< State, CacheStore >::NumInputEpsilons ( StateId  s) const
inline

Definition at line 1038 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
StateId fst::internal::CacheBaseImpl< State, CacheStore >::NumKnownStates ( ) const
inline

Definition at line 1059 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
size_t fst::internal::CacheBaseImpl< State, CacheStore >::NumOutputEpsilons ( StateId  s) const
inline

Definition at line 1043 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::PushArc ( StateId  s,
const Arc arc 
)
inline

Definition at line 940 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::PushArc ( StateId  s,
Arc &&  arc 
)
inline

Definition at line 945 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::ReserveArcs ( StateId  s,
size_t  n 
)
inline

Definition at line 974 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::SetArcs ( StateId  s)
inline

Definition at line 961 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::SetExpandedState ( StateId  s)
inline

Definition at line 1078 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::SetFinal ( StateId  s,
Weight  weight = Weight::One() 
)
inline

Definition at line 930 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::SetStart ( StateId  s)
inline

Definition at line 924 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
StateId fst::internal::CacheBaseImpl< State, CacheStore >::Start ( ) const
inline

Definition at line 1026 of file cache.h.

template<class State, class CacheStore = DefaultCacheStore<typename State::Arc>>
void fst::internal::CacheBaseImpl< State, CacheStore >::UpdateNumKnownStates ( StateId  s)
inline

Definition at line 1062 of file cache.h.


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