FST  openfst-1.8.2
OpenFst Library
Public Types | Public Member Functions | Static Public Member Functions | List of all members
fst::CacheState< A, M > Class Template Reference

#include <cache.h>

Public Types

using Arc = A
 
using Label = typename Arc::Label
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
using ArcAllocator = M
 
using StateAllocator = typename std::allocator_traits< ArcAllocator >::template rebind_alloc< CacheState< A, M >>
 

Public Member Functions

 CacheState (const ArcAllocator &alloc)
 
 CacheState (const CacheState< A > &state, const ArcAllocator &alloc)
 
void Reset ()
 
Weight Final () const
 
size_t NumInputEpsilons () const
 
size_t NumOutputEpsilons () const
 
size_t NumArcs () const
 
const ArcGetArc (size_t n) const
 
const ArcArcs () const
 
uint8_t Flags () const
 
int RefCount () const
 
void SetFinal (Weight weight=Weight::One())
 
void ReserveArcs (size_t n)
 
void AddArc (const Arc &arc)
 
void AddArc (Arc &&arc)
 
void PushArc (const Arc &arc)
 
void PushArc (Arc &&arc)
 
template<class... T>
void EmplaceArc (T &&...ctor_args)
 
void SetArcs ()
 
void SetArc (const Arc &arc, size_t n)
 
void DeleteArcs ()
 
void DeleteArcs (size_t n)
 
void SetFlags (uint8_t flags, uint8_t mask) const
 
int IncrRefCount () const
 
int DecrRefCount () const
 
int * MutableRefCount () const
 
void * operator new (size_t size, StateAllocator *alloc)
 

Static Public Member Functions

static void Destroy (CacheState< Arc > *state, StateAllocator *alloc)
 

Detailed Description

template<class A, class M = PoolAllocator<A>>
class fst::CacheState< A, M >

Definition at line 82 of file cache.h.

Member Typedef Documentation

template<class A, class M = PoolAllocator<A>>
using fst::CacheState< A, M >::Arc = A

Definition at line 84 of file cache.h.

template<class A, class M = PoolAllocator<A>>
using fst::CacheState< A, M >::ArcAllocator = M

Definition at line 89 of file cache.h.

template<class A, class M = PoolAllocator<A>>
using fst::CacheState< A, M >::Label = typename Arc::Label

Definition at line 85 of file cache.h.

template<class A, class M = PoolAllocator<A>>
using fst::CacheState< A, M >::StateAllocator = typename std::allocator_traits< ArcAllocator>::template rebind_alloc<CacheState<A, M>>

Definition at line 91 of file cache.h.

template<class A, class M = PoolAllocator<A>>
using fst::CacheState< A, M >::StateId = typename Arc::StateId

Definition at line 86 of file cache.h.

template<class A, class M = PoolAllocator<A>>
using fst::CacheState< A, M >::Weight = typename Arc::Weight

Definition at line 87 of file cache.h.

Constructor & Destructor Documentation

template<class A, class M = PoolAllocator<A>>
fst::CacheState< A, M >::CacheState ( const ArcAllocator alloc)
inlineexplicit

Definition at line 94 of file cache.h.

template<class A, class M = PoolAllocator<A>>
fst::CacheState< A, M >::CacheState ( const CacheState< A > &  state,
const ArcAllocator alloc 
)
inline

Definition at line 102 of file cache.h.

Member Function Documentation

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::AddArc ( const Arc arc)
inline

Definition at line 146 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::AddArc ( Arc &&  arc)
inline

Definition at line 151 of file cache.h.

template<class A, class M = PoolAllocator<A>>
const Arc* fst::CacheState< A, M >::Arcs ( ) const
inline

Definition at line 130 of file cache.h.

template<class A, class M = PoolAllocator<A>>
int fst::CacheState< A, M >::DecrRefCount ( ) const
inline

Definition at line 207 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::DeleteArcs ( )
inline

Definition at line 183 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::DeleteArcs ( size_t  n)
inline

Definition at line 189 of file cache.h.

template<class A, class M = PoolAllocator<A>>
static void fst::CacheState< A, M >::Destroy ( CacheState< Arc > *  state,
StateAllocator alloc 
)
inlinestatic

Definition at line 218 of file cache.h.

template<class A, class M = PoolAllocator<A>>
template<class... T>
void fst::CacheState< A, M >::EmplaceArc ( T &&...  ctor_args)
inline

Definition at line 163 of file cache.h.

template<class A, class M = PoolAllocator<A>>
Weight fst::CacheState< A, M >::Final ( ) const
inline

Definition at line 119 of file cache.h.

template<class A, class M = PoolAllocator<A>>
uint8_t fst::CacheState< A, M >::Flags ( ) const
inline

Definition at line 133 of file cache.h.

template<class A, class M = PoolAllocator<A>>
const Arc& fst::CacheState< A, M >::GetArc ( size_t  n) const
inline

Definition at line 127 of file cache.h.

template<class A, class M = PoolAllocator<A>>
int fst::CacheState< A, M >::IncrRefCount ( ) const
inline

Definition at line 205 of file cache.h.

template<class A, class M = PoolAllocator<A>>
int* fst::CacheState< A, M >::MutableRefCount ( ) const
inline

Definition at line 210 of file cache.h.

template<class A, class M = PoolAllocator<A>>
size_t fst::CacheState< A, M >::NumArcs ( ) const
inline

Definition at line 125 of file cache.h.

template<class A, class M = PoolAllocator<A>>
size_t fst::CacheState< A, M >::NumInputEpsilons ( ) const
inline

Definition at line 121 of file cache.h.

template<class A, class M = PoolAllocator<A>>
size_t fst::CacheState< A, M >::NumOutputEpsilons ( ) const
inline

Definition at line 123 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void* fst::CacheState< A, M >::operator new ( size_t  size,
StateAllocator alloc 
)
inline

Definition at line 213 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::PushArc ( const Arc arc)
inline

Definition at line 157 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::PushArc ( Arc &&  arc)
inline

Definition at line 159 of file cache.h.

template<class A, class M = PoolAllocator<A>>
int fst::CacheState< A, M >::RefCount ( ) const
inline

Definition at line 136 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::ReserveArcs ( size_t  n)
inline

Definition at line 142 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::Reset ( )
inline

Definition at line 110 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::SetArc ( const Arc arc,
size_t  n 
)
inline

Definition at line 175 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::SetArcs ( )
inline

Definition at line 168 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::SetFinal ( Weight  weight = Weight::One())
inline

Definition at line 138 of file cache.h.

template<class A, class M = PoolAllocator<A>>
void fst::CacheState< A, M >::SetFlags ( uint8_t  flags,
uint8_t  mask 
) const
inline

Definition at line 198 of file cache.h.


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