/external/srec/tools/thirdparty/OpenFst/fst/lib/ |
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())
|
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...] |
arc.h | 0 // arc.h 17 // Commonly used Fst arc types. 28 // Arc with integer labels and state Ids and float weights over the 40 static const string &Type() { // Arc type name 52 // Arc with integer labels and state Ids and float weights over the 64 static const string &Type() { // Arc type name 76 // Arc with integer labels and state Ids and string weights. 89 static const string &Type() { // Arc type name 105 // Arc with label and state Id type the same as template arg and with 109 typedef A Arc; [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...] |
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);
|
project.h | 31 // Mapper to implement projection per arc. 37 A operator()(const A &arc) { 39 ? arc.ilabel : arc.olabel; 40 return A(label, label, arc.weight, arc.nextstate); 62 template<class Arc> inline 63 void Project(MutableFst<Arc> *fst, ProjectType project_type) { 64 Map(fst, ProjectMapper<Arc>(project_type)); 68 // Projects an FST onto its domain or range by either copying each arc' [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);
|
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...] |
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...] |
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...] |
connect.h | 33 typedef A Arc; 34 typedef typename Arc::Weight Weight; 102 bool TreeArc(StateId s, const A &arc) { return true; } 104 bool BackArc(StateId s, const A &arc) { 105 StateId t = arc.nextstate; 112 if (arc.nextstate == start_) { 119 bool ForwardOrCrossArc(StateId s, const A &arc) { 120 StateId t = arc.nextstate; 201 template<class Arc> 202 void Connect(MutableFst<Arc> *fst) [all...] |
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...] |
arcsort.h | 42 template<class Arc, class Compare> 43 void ArcSort(MutableFst<Arc> *fst, Compare comp) { 44 typedef typename Arc::StateId StateId; 48 vector<Arc> arcs; 49 for (StateIterator< MutableFst<Arc> > siter(*fst); 54 for (ArcIterator< MutableFst<Arc> > aiter(*fst, s); 190 typedef A Arc; 307 typedef StdArc Arc;
|
complement.h | 38 // corresponds to input state s - 1. The first arc in the output at 113 typedef A Arc;
|
const-fst.h | 31 // Arc definition. 80 // Provide information needed for the generic arc iterator 149 const A &arc = aiter.Value(); local 151 if (arc.ilabel == 0) 153 if (arc.olabel == 0) 155 arcs_[pos++] = arc; 227 typedef A Arc;
|
encode.h | 46 // Encoded data consists of arc input/output labels and arc weight 111 // Given an arc encode either input/ouptut labels or input/costs or both 112 Label Encode(const A &arc) { 113 const Tuple tuple(arc.ilabel, 114 flags_ & kEncodeLabels ? arc.olabel : 0, 115 flags_ & kEncodeWeights ? arc.weight : Weight::One()); 126 // Given an encode arc Label decode back to input/output labels and costs 230 A operator()(const A &arc) { 232 if ((arc.nextstate == kNoStateId && !(flags_ & kEncodeWeights)) | [all...] |
rational.h | 196 typedef A Arc;
|
relabel.h | 67 A arc = aiter.Value(); local 72 input_map.find(arc.ilabel); 73 if (it != input_map.end()) {arc.ilabel = it->second; } 76 it = output_map.find(arc.olabel); 77 if (it != output_map.end()) { arc.olabel = it->second; } 79 aiter.SetValue(arc); 276 A arc = aiter.Value(); local 281 input_map_.find(arc.ilabel); 282 if (it != input_map_.end()) { arc.ilabel = it->second; } 288 output_map_.find(arc.olabel) [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...] |
factor-weight.h | 147 typedef A Arc; 261 const A &arc = ait.Value(); local 262 Weight w = Times(e.weight, arc.weight); 265 StateId d = FindState(Element(arc.nextstate, Weight::One())); 266 AddArc(s, Arc(arc.ilabel, arc.olabel, w, d)); 270 StateId d = FindState(Element(arc.nextstate, 272 AddArc(s, Arc(arc.ilabel, arc.olabel, p.first, d)) [all...] |
queue.h | 286 // This constructor computes the top. order. It accepts an arc filter 289 template <class Arc, class ArcFilter> 291 TopOrderQueue(const Fst<Arc> &fst, ArcFilter filter) 295 TopOrderVisitor<Arc> top_order_visitor(&order_, &acyclic); 504 template <class Arc, class ArcFilter> 505 AutoQueue(const Fst<Arc> &fst, const vector<typename Arc::Weight> *distance, 507 typedef typename Arc::Weight Weight; 525 SccVisitor<Arc> scc_visitor(&scc_, 0, 0, &props); 615 template <class Arc, class ArcFilter, class Less 666 const Arc &arc = ait.Value(); local [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...] |
synchronize.h | 51 typedef A Arc; 215 const A &arc = ait.Value(); local 216 if (!Empty(e.istring, arc.ilabel) && !Empty(e.ostring, arc.olabel)) { 217 const String *istring = Cdr(e.istring, arc.ilabel); 218 const String *ostring = Cdr(e.ostring, arc.olabel); 219 StateId d = FindState(Element(arc.nextstate, istring, ostring)); 220 AddArc(s, Arc(Car(e.istring, arc.ilabel), 221 Car(e.ostring, arc.olabel), arc.weight, d)) [all...] |
/external/srec/tools/grxmlcompile/ |
fst-io.h | 27 // on the arc type to support multiple and extensible arc types. 43 typedef A Arc; 100 PrintId(l, isyms_, "arc input label"); 104 PrintId(l, osyms_, "arc output label"); 112 Arc arc = aiter.Value(); local 115 PrintStateId(arc.nextstate); 117 PrintILabel(arc.ilabel); 120 PrintOLabel(arc.olabel) 239 Arc arc; local [all...] |