FST  openfst-1.8.3
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 89 of file cache.h.

Member Typedef Documentation

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

Definition at line 91 of file cache.h.

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

Definition at line 96 of file cache.h.

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

Definition at line 92 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 98 of file cache.h.

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

Definition at line 93 of file cache.h.

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

Definition at line 94 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 101 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 109 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 153 of file cache.h.

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

Definition at line 158 of file cache.h.

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

Definition at line 137 of file cache.h.

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

Definition at line 214 of file cache.h.

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

Definition at line 190 of file cache.h.

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

Definition at line 196 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 225 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 170 of file cache.h.

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

Definition at line 126 of file cache.h.

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

Definition at line 140 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 134 of file cache.h.

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

Definition at line 212 of file cache.h.

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

Definition at line 217 of file cache.h.

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

Definition at line 132 of file cache.h.

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

Definition at line 128 of file cache.h.

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

Definition at line 130 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 220 of file cache.h.

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

Definition at line 164 of file cache.h.

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

Definition at line 166 of file cache.h.

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

Definition at line 143 of file cache.h.

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

Definition at line 149 of file cache.h.

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

Definition at line 117 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 182 of file cache.h.

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

Definition at line 175 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 145 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 205 of file cache.h.


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