FST  openfst-1.8.4
OpenFst Library
Public Types | Public Member Functions | Friends | List of all members
fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded > Class Template Reference

#include <arc-map.h>

Inheritance diagram for fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >:
Inheritance graph
[legend]
Collaboration diagram for fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >:
Collaboration graph
[legend]

Public Types

using Arc = B
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
using FromFst = std::conditional_t< is_expanded, ExpandedFst< A >, Fst< A >>
 
using State = typename CacheStore::State
 
using CacheImpl = CacheBaseImpl< 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

 ArcMapFstImpl (const FromFst &fst, const C &mapper, const ArcMapFstOptions &opts)
 
 ArcMapFstImpl (const FromFst &fst, C *mapper, const ArcMapFstOptions &opts)
 
 ArcMapFstImpl (const ArcMapFstImpl &impl)
 
 ~ArcMapFstImpl () override
 
StateId Start ()
 
Weight Final (StateId s)
 
size_t NumArcs (StateId s)
 
size_t NumInputEpsilons (StateId s)
 
size_t NumOutputEpsilons (StateId s)
 
StateId NumStates () const
 
uint64_t Properties () const override
 
uint64_t Properties (uint64_t mask) const override
 
void InitArcIterator (StateId s, ArcIteratorData< B > *data)
 
void Expand (StateId s)
 
- 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 StateIterator< ArcMapFst< A, B, C, CacheStore, PropagateKExpanded::kIfPossible > >
 
class StateIterator< ArcMapFst< A, B, C, CacheStore, PropagateKExpanded::kNo > >
 

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 A, class B, class C, class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
class fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >

Definition at line 362 of file arc-map.h.

Member Typedef Documentation

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
using fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::Arc = B

Definition at line 365 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
using fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::CacheImpl = CacheBaseImpl<State, CacheStore>

Definition at line 376 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
using fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::FromFst = std::conditional_t<is_expanded, ExpandedFst<A>, Fst<A>>

Definition at line 368 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
using fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::State = typename CacheStore::State

Definition at line 375 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
using fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::StateId = typename Arc::StateId

Definition at line 366 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
using fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::Weight = typename Arc::Weight

Definition at line 367 of file arc-map.h.

Constructor & Destructor Documentation

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::ArcMapFstImpl ( const FromFst fst,
const C &  mapper,
const ArcMapFstOptions opts 
)
inline

Definition at line 391 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::ArcMapFstImpl ( const FromFst fst,
C *  mapper,
const ArcMapFstOptions opts 
)
inline

Definition at line 402 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::ArcMapFstImpl ( const ArcMapFstImpl< A, B, C, CacheStore, is_expanded > &  impl)
inline

Definition at line 412 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::~ArcMapFstImpl ( )
inlineoverride

Definition at line 422 of file arc-map.h.

Member Function Documentation

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
void fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::Expand ( StateId  s)
inline

Definition at line 510 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
Weight fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::Final ( StateId  s)
inline

Definition at line 431 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
void fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::InitArcIterator ( StateId  s,
ArcIteratorData< B > *  data 
)
inline

Definition at line 505 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
size_t fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::NumArcs ( StateId  s)
inline

Definition at line 468 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
size_t fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::NumInputEpsilons ( StateId  s)
inline

Definition at line 474 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
size_t fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::NumOutputEpsilons ( StateId  s)
inline

Definition at line 479 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
StateId fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::NumStates ( ) const
inline

Definition at line 485 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
uint64_t fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::Properties ( ) const
inlineoverridevirtual

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

Definition at line 494 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
uint64_t fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::Properties ( uint64_t  mask) const
inlineoverridevirtual

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

Definition at line 497 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
StateId fst::internal::ArcMapFstImpl< A, B, C, CacheStore, is_expanded >::Start ( )
inline

Definition at line 426 of file arc-map.h.

Friends And Related Function Documentation

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
friend class StateIterator< ArcMapFst< A, B, C, CacheStore, PropagateKExpanded::kIfPossible > >
friend

Definition at line 387 of file arc-map.h.

template<class A , class B , class C , class CacheStore = DefaultCacheStore<B>, bool is_expanded = false>
friend class StateIterator< ArcMapFst< A, B, C, CacheStore, PropagateKExpanded::kNo > >
friend

Definition at line 389 of file arc-map.h.


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