FST
openfst-1.8.4
OpenFst Library
|
#include <compact-fst.h>
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 Compactor * | GetCompactor () const |
Compactor * | MutableCompactor () |
std::shared_ptr< Compactor > | SharedCompactor () |
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 |
FstImpl & | operator= (const FstImpl &impl) |
FstImpl & | operator= (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 SymbolTable * | InputSymbols () const |
SymbolTable * | InputSymbols () |
const SymbolTable * | OutputSymbols () const |
SymbolTable * | OutputSymbols () |
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 * | 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, 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_ |
Definition at line 855 of file compact-fst.h.
using fst::internal::CompactFstImpl< Arc, C, CacheStore >::Compactor = C |
Definition at line 860 of file compact-fst.h.
using fst::internal::CompactFstImpl< Arc, C, CacheStore >::ImplBase = CacheBaseImpl<typename CacheStore::State, CacheStore> |
Definition at line 869 of file compact-fst.h.
using fst::internal::CompactFstImpl< Arc, C, CacheStore >::StateId = typename Arc::StateId |
Definition at line 859 of file compact-fst.h.
using fst::internal::CompactFstImpl< Arc, C, CacheStore >::Weight = typename Arc::Weight |
Definition at line 858 of file compact-fst.h.
|
inline |
Definition at line 878 of file compact-fst.h.
|
inline |
Definition at line 889 of file compact-fst.h.
|
inline |
Definition at line 911 of file compact-fst.h.
|
inline |
Definition at line 921 of file compact-fst.h.
|
inlineexplicit |
Definition at line 934 of file compact-fst.h.
|
inlineexplicitprotected |
Definition at line 1061 of file compact-fst.h.
|
inline |
Definition at line 980 of file compact-fst.h.
|
inline |
Definition at line 1037 of file compact-fst.h.
|
inline |
Definition at line 951 of file compact-fst.h.
|
inline |
Definition at line 1046 of file compact-fst.h.
|
inline |
Definition at line 1032 of file compact-fst.h.
|
inline |
Definition at line 1027 of file compact-fst.h.
|
inline |
Definition at line 1047 of file compact-fst.h.
|
inline |
Definition at line 962 of file compact-fst.h.
|
inline |
Definition at line 968 of file compact-fst.h.
|
inline |
Definition at line 974 of file compact-fst.h.
|
inline |
Definition at line 957 of file compact-fst.h.
|
inlinestatic |
Definition at line 997 of file compact-fst.h.
|
inline |
Definition at line 1049 of file compact-fst.h.
|
inline |
Definition at line 1048 of file compact-fst.h.
|
inline |
Definition at line 946 of file compact-fst.h.
|
inline |
Definition at line 1015 of file compact-fst.h.
|
static |
Definition at line 1057 of file compact-fst.h.