FST  openfst-1.8.2.post1
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 ()
 
 FstImpl (const FstImpl< State::Arc > &impl)
 
 FstImpl (FstImpl< State::Arc > &&impl) noexcept
 
virtual ~FstImpl ()
 
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 850 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 852 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 853 of file cache.h.

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

Definition at line 856 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 854 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 861 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 873 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 889 of file cache.h.

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

Definition at line 913 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 982 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 972 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 977 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 947 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 1082 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 1021 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 1100 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 1102 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 1094 of file cache.h.

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

Definition at line 1096 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 1009 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 998 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 992 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 1042 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 1069 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 1060 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 1026 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 1031 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 1052 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 1036 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 933 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 938 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 967 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 954 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 1071 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 923 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 917 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 1019 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 1055 of file cache.h.


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