FST  openfst-1.8.2
OpenFst Library
Public Types | Public Member Functions | List of all members
fst::LabelReachable< Arc, Accumulator, D, LB > Class Template Reference

#include <label-reachable.h>

Public Types

using Label = typename Arc::Label
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
using Data = D
 
using LowerBound = LB
 
using LabelIntervalSet = typename Data::LabelIntervalSet
 
using Interval = typename LabelIntervalSet::Interval
 

Public Member Functions

 LabelReachable (const Fst< Arc > &fst, bool reach_input, std::unique_ptr< Accumulator > accumulator=nullptr, bool keep_relabel_data=true)
 
 LabelReachable (std::shared_ptr< Data > data, std::unique_ptr< Accumulator > accumulator=nullptr)
 
 LabelReachable (const LabelReachable &reachable, bool safe=false)
 
 ~LabelReachable ()
 
Label Relabel (Label label)
 
void Relabel (MutableFst< Arc > *fst, bool relabel_input)
 
void RelabelPairs (std::vector< std::pair< Label, Label >> *pairs, bool avoid_collisions=false)
 
void SetState (StateId s, StateId aiter_s=kNoStateId)
 
bool Reach (Label label) const
 
bool ReachFinal () const
 
template<class FST >
void ReachInit (const FST &fst, bool reach_input, bool copy=false)
 
template<class Iterator >
bool Reach (Iterator *aiter, ssize_t aiter_begin, ssize_t aiter_end, bool compute_weight)
 
ssize_t ReachBegin () const
 
ssize_t ReachEnd () const
 
Weight ReachWeight () const
 
const std::unordered_map< Label, Label > & Label2Index () const
 
const DataGetData () const
 
std::shared_ptr< DataGetSharedData () const
 
bool Error () const
 

Detailed Description

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
class fst::LabelReachable< Arc, Accumulator, D, LB >

Definition at line 234 of file label-reachable.h.

Member Typedef Documentation

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
using fst::LabelReachable< Arc, Accumulator, D, LB >::Data = D

Definition at line 239 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
using fst::LabelReachable< Arc, Accumulator, D, LB >::Interval = typename LabelIntervalSet::Interval

Definition at line 244 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
using fst::LabelReachable< Arc, Accumulator, D, LB >::Label = typename Arc::Label

Definition at line 236 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
using fst::LabelReachable< Arc, Accumulator, D, LB >::LabelIntervalSet = typename Data::LabelIntervalSet

Definition at line 242 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
using fst::LabelReachable< Arc, Accumulator, D, LB >::LowerBound = LB

Definition at line 240 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
using fst::LabelReachable< Arc, Accumulator, D, LB >::StateId = typename Arc::StateId

Definition at line 237 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
using fst::LabelReachable< Arc, Accumulator, D, LB >::Weight = typename Arc::Weight

Definition at line 238 of file label-reachable.h.

Constructor & Destructor Documentation

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
fst::LabelReachable< Arc, Accumulator, D, LB >::LabelReachable ( const Fst< Arc > &  fst,
bool  reach_input,
std::unique_ptr< Accumulator >  accumulator = nullptr,
bool  keep_relabel_data = true 
)
inline

Definition at line 246 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
fst::LabelReachable< Arc, Accumulator, D, LB >::LabelReachable ( std::shared_ptr< Data data,
std::unique_ptr< Accumulator >  accumulator = nullptr 
)
inlineexplicit

Definition at line 260 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
fst::LabelReachable< Arc, Accumulator, D, LB >::LabelReachable ( const LabelReachable< Arc, Accumulator, D, LB > &  reachable,
bool  safe = false 
)
inline

Definition at line 267 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
fst::LabelReachable< Arc, Accumulator, D, LB >::~LabelReachable ( )
inline

Definition at line 276 of file label-reachable.h.

Member Function Documentation

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
bool fst::LabelReachable< Arc, Accumulator, D, LB >::Error ( ) const
inline

Definition at line 488 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
const Data* fst::LabelReachable< Arc, Accumulator, D, LB >::GetData ( ) const
inline

Definition at line 484 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
std::shared_ptr<Data> fst::LabelReachable< Arc, Accumulator, D, LB >::GetSharedData ( ) const
inline

Definition at line 486 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
const std::unordered_map<Label, Label>& fst::LabelReachable< Arc, Accumulator, D, LB >::Label2Index ( ) const
inline

Definition at line 480 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
bool fst::LabelReachable< Arc, Accumulator, D, LB >::Reach ( Label  label) const
inline

Definition at line 364 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
template<class Iterator >
bool fst::LabelReachable< Arc, Accumulator, D, LB >::Reach ( Iterator *  aiter,
ssize_t  aiter_begin,
ssize_t  aiter_end,
bool  compute_weight 
)
inline

Definition at line 398 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
ssize_t fst::LabelReachable< Arc, Accumulator, D, LB >::ReachBegin ( ) const
inline

Definition at line 468 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
ssize_t fst::LabelReachable< Arc, Accumulator, D, LB >::ReachEnd ( ) const
inline

Definition at line 471 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
bool fst::LabelReachable< Arc, Accumulator, D, LB >::ReachFinal ( ) const
inline

Definition at line 370 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
template<class FST >
void fst::LabelReachable< Arc, Accumulator, D, LB >::ReachInit ( const FST fst,
bool  reach_input,
bool  copy = false 
)
inline

Definition at line 381 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
Weight fst::LabelReachable< Arc, Accumulator, D, LB >::ReachWeight ( ) const
inline

Definition at line 475 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
Label fst::LabelReachable< Arc, Accumulator, D, LB >::Relabel ( Label  label)
inline

Definition at line 284 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
void fst::LabelReachable< Arc, Accumulator, D, LB >::Relabel ( MutableFst< Arc > *  fst,
bool  relabel_input 
)
inline

Definition at line 298 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
void fst::LabelReachable< Arc, Accumulator, D, LB >::RelabelPairs ( std::vector< std::pair< Label, Label >> *  pairs,
bool  avoid_collisions = false 
)
inline

Definition at line 324 of file label-reachable.h.

template<class Arc, class Accumulator = DefaultAccumulator<Arc>, class D = LabelReachableData<typename Arc::Label>, class LB = LabelLowerBound<Arc>>
void fst::LabelReachable< Arc, Accumulator, D, LB >::SetState ( StateId  s,
StateId  aiter_s = kNoStateId 
)
inline

Definition at line 353 of file label-reachable.h.


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