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

#include <replace.h>

Inheritance diagram for fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >:
Inheritance graph
[legend]
Collaboration diagram for fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >:
Collaboration graph
[legend]

Public Types

using Label = typename Arc::Label
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
using State = typename CacheStore::State
 
using CacheImpl = CacheBaseImpl< State, CacheStore >
 
using PrefixId = typename StateTable::PrefixId
 
using StateTuple = ReplaceStateTuple< StateId, PrefixId >
 
using StackPrefix = ReplaceStackPrefix< Label, StateId >
 
using NonTerminalHash = std::unordered_map< Label, Label >
 
- 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

 ReplaceFstImpl (const FstList< Arc > &fst_list, const ReplaceFstOptions< Arc, StateTable, CacheStore > &opts)
 
 ReplaceFstImpl (const ReplaceFstImpl &impl)
 
bool CyclicDependencies () const
 
StateId Start ()
 
Weight Final (StateId s)
 
size_t NumArcs (StateId s)
 
bool IsNonTerminal (Label label) const
 
size_t NumInputEpsilons (StateId s)
 
size_t NumOutputEpsilons (StateId s)
 
uint64_t Properties () const override
 
uint64_t Properties (uint64_t mask) const override
 
void InitArcIterator (StateId s, ArcIteratorData< Arc > *data)
 
void Expand (StateId s)
 
void Expand (StateId s, const StateTuple &tuple, const ArcIteratorData< Arc > &data)
 
bool ComputeFinalArc (const StateTuple &tuple, Arc *arcp, uint8_t flags=kArcValueFlags)
 
bool ComputeArc (const StateTuple &tuple, const Arc &arc, Arc *arcp, uint8_t flags=kArcValueFlags)
 
uint8_t ArcIteratorFlags () const
 
StateTable * GetStateTable () const
 
const Fst< Arc > * GetFst (Label fst_id) const
 
Label GetFstId (Label nonterminal) const
 
bool EpsilonOnCallInput ()
 
- 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)
 
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
 

Friends

class ReplaceFstMatcher< Arc, StateTable, CacheStore >
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from fst::internal::FstImpl< CacheStore::State::Arc >
std::atomic< uint64_t > properties_
 

Detailed Description

template<class Arc, class StateTable, class CacheStore>
class fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >

Definition at line 499 of file replace.h.

Member Typedef Documentation

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::CacheImpl = CacheBaseImpl<State, CacheStore>

Definition at line 507 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::Label = typename Arc::Label

Definition at line 502 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::NonTerminalHash = std::unordered_map<Label, Label>

Definition at line 511 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::PrefixId = typename StateTable::PrefixId

Definition at line 508 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::StackPrefix = ReplaceStackPrefix<Label, StateId>

Definition at line 510 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::State = typename CacheStore::State

Definition at line 506 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::StateId = typename Arc::StateId

Definition at line 503 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::StateTuple = ReplaceStateTuple<StateId, PrefixId>

Definition at line 509 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
using fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::Weight = typename Arc::Weight

Definition at line 504 of file replace.h.

Constructor & Destructor Documentation

template<class Arc, class StateTable, class CacheStore>
fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::ReplaceFstImpl ( const FstList< Arc > &  fst_list,
const ReplaceFstOptions< Arc, StateTable, CacheStore > &  opts 
)
inline

Definition at line 531 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::ReplaceFstImpl ( const ReplaceFstImpl< Arc, StateTable, CacheStore > &  impl)
inline

Definition at line 586 of file replace.h.

Member Function Documentation

template<class Arc, class StateTable, class CacheStore>
uint8_t fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::ArcIteratorFlags ( ) const
inline

Definition at line 897 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
bool fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::ComputeArc ( const StateTuple tuple,
const Arc arc,
Arc arcp,
uint8_t  flags = kArcValueFlags 
)
inline

Definition at line 842 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
bool fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::ComputeFinalArc ( const StateTuple tuple,
Arc arcp,
uint8_t  flags = kArcValueFlags 
)
inline

Definition at line 811 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
bool fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::CyclicDependencies ( ) const
inline

Definition at line 611 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
bool fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::EpsilonOnCallInput ( )
inline

Definition at line 919 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
void fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::Expand ( StateId  s)
inline

Definition at line 775 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
void fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::Expand ( StateId  s,
const StateTuple tuple,
const ArcIteratorData< Arc > &  data 
)
inline

Definition at line 792 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
Weight fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::Final ( StateId  s)
inline

Definition at line 636 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
const Fst<Arc>* fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::GetFst ( Label  fst_id) const
inline

Definition at line 905 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
Label fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::GetFstId ( Label  nonterminal) const
inline

Definition at line 909 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
StateTable* fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::GetStateTable ( ) const
inline

Definition at line 903 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
void fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::InitArcIterator ( StateId  s,
ArcIteratorData< Arc > *  data 
)
inline

Definition at line 766 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
bool fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::IsNonTerminal ( Label  label) const
inline

Definition at line 664 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
size_t fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::NumArcs ( StateId  s)
inline

Definition at line 648 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
size_t fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::NumInputEpsilons ( StateId  s)
inline

Definition at line 678 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
size_t fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::NumOutputEpsilons ( StateId  s)
inline

Definition at line 714 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
uint64_t fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::Properties ( ) const
inlineoverridevirtual

Reimplemented from fst::internal::FstImpl< CacheStore::State::Arc >.

Definition at line 750 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
uint64_t fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::Properties ( uint64_t  mask) const
inlineoverridevirtual

Reimplemented from fst::internal::FstImpl< CacheStore::State::Arc >.

Definition at line 753 of file replace.h.

template<class Arc, class StateTable, class CacheStore>
StateId fst::internal::ReplaceFstImpl< Arc, StateTable, CacheStore >::Start ( )
inline

Definition at line 617 of file replace.h.

Friends And Related Function Documentation

template<class Arc, class StateTable, class CacheStore>
friend class ReplaceFstMatcher< Arc, StateTable, CacheStore >
friend

Definition at line 529 of file replace.h.


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