/external/srec/tools/thirdparty/OpenFst/fst/lib/ |
epsnormalize.h | 49 template <class Arc> 50 void EpsNormalize(const Fst<Arc> &ifst, MutableFst<Arc> *ofst, 52 VectorFst< GallicArc<Arc, STRING_RIGHT_RESTRICT> > gfst; 54 Map(ifst, &gfst, ToGallicMapper<Arc, STRING_RIGHT_RESTRICT>()); 56 Map(InvertFst<Arc>(ifst), &gfst, 57 ToGallicMapper<Arc, STRING_RIGHT_RESTRICT>()); 59 FactorWeightFst< GallicArc<Arc, STRING_RIGHT_RESTRICT>, 60 GallicFactor<typename Arc::Label, 61 typename Arc::Weight, STRING_RIGHT_RESTRICT> [all...] |
push.h | 40 template <class Arc> 41 void Push(MutableFst<Arc> *fst, ReweightType type) { 42 vector<typename Arc::Weight> distance; 56 template <class Arc, ReweightType rtype> 57 void Push(const Fst<Arc> &ifst, MutableFst<Arc> *ofst, uint32 ptype) { 66 vector<typename GallicArc<Arc, stype>::Weight> gdistance; 67 VectorFst< GallicArc<Arc, stype> > gfst; 68 Map(ifst, &gfst, ToGallicMapper<Arc, stype>()); 72 MapFst<Arc, Arc, RmWeightMapper<Arc> [all...] |
dfs-visit.h | 34 // template <class Arc> 37 // typedef typename Arc::StateId StateId; 41 // void InitVisit(const Fst<Arc> &fst); 44 // // Invoked when tree arc examined (to white/undiscovered state) 45 // bool TreeArc(StateId s, const Arc &a); 46 // // Invoked when back arc examined (to grey/unfinished state) 47 // bool BackArc(StateId s, const Arc &a); 48 // // Invoked when forward or cross arc examined (to black/finished state) 49 // bool ForwardOrCrossArc(StateId s, const Arc &a); 50 // // Invoked when state finished (PARENT is kNoStateID and ARC == NUL 123 const Arc &arc = aiter.Value(); local [all...] |
statesort.h | 32 template <class Arc> 33 void StateSort(MutableFst<Arc> *fst, 34 const vector<typename Arc::StateId> &order) { 35 typedef typename Arc::StateId StateId; 36 typedef typename Arc::Weight Weight; 46 vector<Arc> arcsa, arcsb; 47 vector<Arc> *arcs1 = &arcsa, *arcs2 = &arcsb; 51 for (StateIterator< MutableFst<Arc> > siter(*fst); 59 for (ArcIterator< MutableFst<Arc> > aiter(*fst, s1); 68 for (ArcIterator< MutableFst<Arc> > aiter(*fst, s2) 76 Arc arc = (*arcs1)[i]; local [all...] |
prune.h | 35 // Arc filter. 55 template <class Arc, class ArcFilter> 56 void Prune(MutableFst<Arc> *fst, 57 const PruneOptions<Arc, ArcFilter> &opts) { 58 typedef typename Arc::Weight Weight; 59 typedef typename Arc::StateId StateId; 97 for (MutableArcIterator< MutableFst<Arc> > it(fst, state); 100 Arc arc = it.Value(); local 101 if (!opts.filter(arc)) continue 199 Arc arc = ait.Value(); local [all...] |
shortest-distance.h | 33 template <class Arc, class Queue, class ArcFilter> 35 typedef typename Arc::StateId StateId; 38 ArcFilter arc_filter; // Arc filter (e.g., limit to only epsilon graph) 54 template<class Arc, class Queue, class ArcFilter> 57 typedef typename Arc::StateId StateId; 58 typedef typename Arc::Weight Weight; 61 const Fst<Arc> &fst, 63 const ShortestDistanceOptions<Arc, Queue, ArcFilter> &opts, 78 const Fst<Arc> *fst_; 93 template <class Arc, class Queue, class ArcFilter 144 const Arc &arc = aiter.Value(); local [all...] |
union.h | 36 template <class Arc> 37 void Union(MutableFst<Arc> *fst1, const Fst<Arc> &fst2) { 38 typedef typename Arc::StateId StateId; 39 typedef typename Arc::Label Label; 40 typedef typename Arc::Weight Weight; 51 for (StateIterator< Fst<Arc> > siter(fst2); 57 for (ArcIterator< Fst<Arc> > aiter(fst2, s2); 60 Arc arc = aiter.Value() local [all...] |
closure.h | 38 template<class Arc> 39 void Closure(MutableFst<Arc> *fst, ClosureType closure_type) { 40 typedef typename Arc::StateId StateId; 41 typedef typename Arc::Label Label; 42 typedef typename Arc::Weight Weight; 46 for (StateIterator< MutableFst<Arc> > siter(*fst); 52 fst->AddArc(s, Arc(0, 0, final, start)); 59 fst->AddArc(nstart, Arc(0, 0, Weight::One(), start)); 67 template<class Arc> 68 void Closure(RationalFst<Arc> *fst, ClosureType closure_type) [all...] |
equal.h | 27 template<class Arc> 28 bool Equal(const Fst<Arc> &fst1, const Fst<Arc> &fst2) { 29 typedef typename Arc::StateId StateId; 30 typedef typename Arc::Weight Weight; 37 StateIterator< Fst<Arc> > siter1(fst1); 38 StateIterator< Fst<Arc> > siter2(fst2); 62 ArcIterator< Fst<Arc> > aiter1(fst1, s1); 63 ArcIterator< Fst<Arc> > aiter2(fst2, s2); 70 Arc arc1 = aiter1.Value() [all...] |
expanded-fst.h | 30 typedef A Arc; 57 << "\" (arc type = \"" << A::Type() 81 template <class Arc> 82 typename Arc::StateId CountStates(const Fst<Arc> &fst) { 84 const ExpandedFst<Arc> *efst = down_cast<const ExpandedFst<Arc> *>(&fst); 87 typename Arc::StateId nstates = 0; 88 for (StateIterator< Fst<Arc> > siter(fst); !siter.Done(); siter.Next())
|
concat.h | 38 template<class Arc> 39 void Concat(MutableFst<Arc> *fst1, const Fst<Arc> &fst2) { 40 typedef typename Arc::StateId StateId; 41 typedef typename Arc::Label Label; 42 typedef typename Arc::Weight Weight; 53 for (StateIterator< Fst<Arc> > siter2(fst2); 59 for (ArcIterator< Fst<Arc> > aiter(fst2, s2); 62 Arc arc = aiter.Value() local [all...] |
reverse.h | 31 // Typically, a = a.Reverse() and Arc = RevArc (e.g. for 33 // only form a left or right semiring, the output arc type must match 34 // the input arc type except having the reversed Weight type. 35 template<class Arc, class RevArc> 36 void Reverse(const Fst<Arc> &ifst, MutableFst<RevArc> *ofst) { 37 typedef typename Arc::StateId StateId; 38 typedef typename Arc::Weight Weight; 48 for (StateIterator< Fst<Arc> > siter(ifst); 64 for (ArcIterator< Fst<Arc> > aiter(ifst, is); 67 const Arc &iarc = aiter.Value() [all...] |
shortest-path.h | 32 template <class Arc, class Queue, class ArcFilter> 34 : public ShortestDistanceOptions<Arc, Queue, ArcFilter> { 35 typedef typename Arc::StateId StateId; 44 : ShortestDistanceOptions<Arc, Queue, ArcFilter>(q, filt, kNoStateId, d), 53 // such as the queue discipline, the arc filter and delta. 60 template<class Arc, class Queue, class ArcFilter> 61 void SingleShortestPath(const Fst<Arc> &ifst, 62 MutableFst<Arc> *ofst, 63 vector<typename Arc::Weight> *distance, 64 ShortestPathOptions<Arc, Queue, ArcFilter> &opts) 115 const Arc &arc = aiter.Value(); local [all...] |
reweight.h | 34 // An arc of weight w, with an origin state of potential p and 38 template <class Arc> 39 void Reweight(MutableFst<Arc> *fst, vector<typename Arc::Weight> potential, 41 typedef typename Arc::Weight Weight; 58 for (StateIterator< MutableFst<Arc> > sit(*fst); 61 typename Arc::StateId state = sit.Value(); 62 for (MutableArcIterator< MutableFst<Arc> > ait(fst, state); 65 Arc arc = ait.Value() local 94 Arc arc = ait.Value(); local [all...] |
verify.h | 28 template<class Arc> 29 bool Verify(const Fst<Arc> &fst) { 30 typedef typename Arc::Label Label; 31 typedef typename Arc::Weight Weight; 32 typedef typename Arc::StateId StateId; 40 for (StateIterator< Fst<Arc> > siter(fst); 53 for (StateIterator< Fst<Arc> > siter(fst); 58 for (ArcIterator< Fst<Arc> > aiter(fst, s); 61 const Arc &arc =aiter.Value() local [all...] |
equivalent.h | 38 // disjoint, we map Arc::StateId on the type MappedId. The states of 45 template <class Arc> 47 typedef typename Arc::StateId StateId; 48 typedef typename Arc::Weight Weight; 74 static bool IsFinal(const Fst<Arc> &fa, MappedId s) { 112 template <class Arc> 113 bool Equivalent(const Fst<Arc> &fst1, const Fst<Arc> &fst2) { 114 typedef typename Arc::Weight Weight; 128 VectorFst<Arc> efst1(fst1) 193 const Arc &arc = arc_iter.Value(); local 205 const Arc &arc = arc_iter.Value(); local [all...] |
randgen.h | 31 // ARC SELECTORS - these function objects are used to select a random 74 const A &arc = aiter.Value(); local 75 sum += exp(-arc.weight.Value()); 84 const A &arc = aiter.Value(); local 85 p += exp(-arc.weight.Value()); 100 const S &arc_selector; // How an arc is selected at a state 116 template<class Arc, class ArcSelector> 117 void RandGen(const Fst<Arc> &ifst, MutableFst<Arc> *ofst, 119 typedef typename Arc::Weight Weight [all...] |
rmepsilon.h | 40 template <class Arc, class Queue> 42 : public ShortestDistanceOptions<Arc, Queue, EpsilonArcFilter<Arc> > { 43 typedef typename Arc::StateId StateId; 48 : ShortestDistanceOptions<Arc, Queue, EpsilonArcFilter<Arc> >( 49 q, EpsilonArcFilter<Arc>(), kNoStateId, d), connect(c) {} 55 template <class Arc, class Queue> 58 typedef typename Arc::Label Label; 59 typedef typename Arc::StateId StateId 154 Arc arc = ait.Value(); local [all...] |
invert.h | 27 // Mapper to implement inversion of an arc. 31 A operator()(const A &arc) { 32 return A(arc.olabel, arc.ilabel, arc.weight, arc.nextstate); 48 template<class Arc> inline 49 void Invert(MutableFst<Arc> *fst) { Map(fst, InvertMapper<Arc>()); } 59 // time and to visit an input state or arc is assumed and exclusiv [all...] |
topsort.h | 35 typedef A Arc; 51 bool TreeArc(StateId s, const A &arc) { return true; } 53 bool BackArc(StateId s, const A &arc) { return (*acyclic_ = false); } 55 bool ForwardOrCrossArc(StateId s, const A &arc) { return true; } 85 template <class Arc> 86 bool TopSort(MutableFst<Arc> *fst) { 87 typedef typename Arc::StateId StateId; 92 TopOrderVisitor<Arc> top_order_visitor(&order, &acyclic);
|
mutable-fst.h | 18 // and mutable arc iterator interface. 35 typedef A Arc; 46 virtual void AddArc(StateId, const A &arc) = 0; // Add an arc to state 90 << "\" (arc type = \"" << A::Type() 108 // For generic mutuble arc iterator construction; not normally called 114 // Mutable arc iterator interface, templated on the Arc definition. 118 typedef A Arc; 119 virtual void SetValue(const A &arc) = 0; // Set current arc's content [all...] |
difference.h | 48 typedef A Arc; 127 template<class Arc> 128 void Difference(const Fst<Arc> &ifst1, const Fst<Arc> &ifst2, 129 MutableFst<Arc> *ofst, 133 *ofst = DifferenceFst<Arc>(ifst1, ifst2, nopts);
|
intersect.h | 45 typedef A Arc; 117 template<class Arc> 118 void Intersect(const Fst<Arc> &ifst1, const Fst<Arc> &ifst2, 119 MutableFst<Arc> *ofst, 123 *ofst = IntersectFst<Arc>(ifst1, ifst2, nopts);
|
register.h | 127 // from 'Fst<Arc>' for this to work. 131 typedef typename F::Arc Arc; 132 typedef typename FstRegister<Arc>::Entry Entry; 133 typedef typename FstRegister<Arc>::Reader Reader; 142 FstRegister<Arc> *registr = FstRegister<Arc>::GetRegister(); 147 static Fst<Arc> *Convert(const Fst<Arc> &fst) { return new F(fst); } 165 << "\" (arc type = \"" << atype << "\")" [all...] |
cache.h | 53 // garbage collection of states (not in use in an arc iterator) is 61 using FstImpl<typename S::Arc>::Type; 66 typedef typename S::Arc Arc; 67 typedef typename Arc::Weight Weight; 68 typedef typename Arc::StateId StateId; 140 cache_first_state_->arcs.capacity() * sizeof(Arc); 170 void AddArc(StateId s, const Arc &arc) { 172 state->arcs.push_back(arc); 181 const Arc &arc = arcs[a]; local [all...] |