FST  openfst-1.7.5
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 Properties () const override
 
uint64 Properties (uint64 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 flags=kArcValueFlags)
 
bool ComputeArc (const StateTuple &tuple, const Arc &arc, Arc *arcp, uint8 flags=kArcValueFlags)
 
uint8 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 ()
 
 FstImpl (const FstImpl< CacheStore::State::Arc > &impl)
 
 FstImpl (FstImpl< CacheStore::State::Arc > &&impl) noexcept
 
virtual ~FstImpl ()
 
FstImploperator= (const FstImpl &impl)
 
FstImploperator= (FstImpl &&impl) noexcept
 
const std::string & Type () const
 
void SetType (const std::string &type)
 
void SetProperties (uint64 props)
 
void SetProperties (uint64 props, uint64 mask)
 
void SetProperties (uint64 props, uint64 mask) const
 
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, const std::string &type, uint64 properties, FstHeader *hdr)
 
static bool UpdateFstHeader (const Fst< CacheStore::State::Arc > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, const std::string &type, uint64 properties, FstHeader *hdr, size_t header_offset)
 
- Protected Attributes inherited from fst::internal::FstImpl< CacheStore::State::Arc >
uint64 properties_
 

Detailed Description

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

Definition at line 455 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 463 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 458 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 467 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 464 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 466 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 462 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 459 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 465 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 460 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 487 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 542 of file replace.h.

Member Function Documentation

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

Definition at line 853 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  flags = kArcValueFlags 
)
inline

Definition at line 798 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  flags = kArcValueFlags 
)
inline

Definition at line 767 of file replace.h.

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

Definition at line 567 of file replace.h.

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

Definition at line 875 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 731 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 748 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 592 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 861 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 865 of file replace.h.

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

Definition at line 859 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 722 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 620 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 604 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 634 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 670 of file replace.h.

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

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

Definition at line 706 of file replace.h.

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

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

Definition at line 709 of file replace.h.

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

Definition at line 573 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 485 of file replace.h.


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