Home
last modified time | relevance | path

Searched refs:Arc (Results 1 – 25 of 47) sorted by relevance

12

/external/srec/tools/thirdparty/OpenFst/fst/lib/
Dpush.h40 template <class Arc>
41 void Push(MutableFst<Arc> *fst, ReweightType type) { in Push()
42 vector<typename Arc::Weight> distance; in Push()
56 template <class Arc, ReweightType rtype>
57 void Push(const Fst<Arc> &ifst, MutableFst<Arc> *ofst, uint32 ptype) { in Push()
66 vector<typename GallicArc<Arc, stype>::Weight> gdistance; in Push()
67 VectorFst< GallicArc<Arc, stype> > gfst; in Push()
68 Map(ifst, &gfst, ToGallicMapper<Arc, stype>()); in Push()
72 MapFst<Arc, Arc, RmWeightMapper<Arc> > in Push()
73 uwfst(ifst, RmWeightMapper<Arc>()); in Push()
[all …]
Dprune.h55 template <class Arc, class ArcFilter>
56 void Prune(MutableFst<Arc> *fst, in Prune()
57 const PruneOptions<Arc, ArcFilter> &opts) { in Prune() argument
58 typedef typename Arc::Weight Weight; in Prune()
59 typedef typename Arc::StateId StateId; in Prune()
97 for (MutableArcIterator< MutableFst<Arc> > it(fst, state); in Prune()
100 Arc arc = it.Value(); in Prune()
127 template <class Arc>
128 void Prune(MutableFst<Arc> *fst, typename Arc::Weight threshold) { in Prune()
129 PruneOptions<Arc, AnyArcFilter<Arc> > opts(threshold, AnyArcFilter<Arc>()); in Prune()
[all …]
Dshortest-distance.h33 template <class Arc, class Queue, class ArcFilter>
35 typedef typename Arc::StateId StateId;
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, in ShortestDistanceState()
63 const ShortestDistanceOptions<Arc, Queue, ArcFilter> &opts, in ShortestDistanceState() argument
78 const Fst<Arc> *fst_;
93 template <class Arc, class Queue, class ArcFilter>
94 void ShortestDistanceState<Arc, Queue, ArcFilter>::ShortestDistance( in ShortestDistance()
[all …]
Dshortest-path.h32 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),
60 template<class Arc, class Queue, class ArcFilter>
61 void SingleShortestPath(const Fst<Arc> &ifst, in SingleShortestPath()
62 MutableFst<Arc> *ofst, in SingleShortestPath()
63 vector<typename Arc::Weight> *distance, in SingleShortestPath()
64 ShortestPathOptions<Arc, Queue, ArcFilter> &opts) { in SingleShortestPath() argument
65 typedef typename Arc::StateId StateId; in SingleShortestPath()
[all …]
Ddfs-visit.h63 template <class Arc>
65 typedef typename Arc::StateId StateId;
67 DfsState(const Fst<Arc> &fst, StateId s): state_id(s), arc_iter(fst, s) {} in DfsState()
70 ArcIterator< Fst<Arc> > arc_iter; // and its corresponding arcs
76 template <class Arc, class V, class ArcFilter>
77 void DfsVisit(const Fst<Arc> &fst, V *visitor, ArcFilter filter) { in DfsVisit()
78 typedef typename Arc::StateId StateId; in DfsVisit()
89 stack<DfsState<Arc> *> state_stack; // DFS execution stack in DfsVisit()
102 state_stack.push(new DfsState<Arc>(fst, root)); in DfsVisit()
105 DfsState<Arc> *dfs_state = state_stack.top(); in DfsVisit()
[all …]
Drmepsilon.h40 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;
60 typedef typename Arc::Weight Weight;
62 RmEpsilonState(const Fst<Arc> &fst, in RmEpsilonState()
[all …]
Dequivalent.h45 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) { in IsFinal()
112 template <class Arc>
113 bool Equivalent(const Fst<Arc> &fst1, const Fst<Arc> &fst2) { in Equivalent()
114 typedef typename Arc::Weight Weight; in Equivalent()
128 VectorFst<Arc> efst1(fst1); in Equivalent()
129 VectorFst<Arc> efst2(fst2); in Equivalent()
132 Map(&efst1, QuantizeMapper<Arc>()); in Equivalent()
[all …]
Depsnormalize.h49 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> >
63 Map(fwfst, ofst, FromGallicMapper<Arc, STRING_RIGHT_RESTRICT>());
Dunion.h36 template <class Arc>
37 void Union(MutableFst<Arc> *fst1, const Fst<Arc> &fst2) { in Union()
38 typedef typename Arc::StateId StateId; in Union()
39 typedef typename Arc::Label Label; in Union()
40 typedef typename Arc::Weight Weight; in Union()
51 for (StateIterator< Fst<Arc> > siter(fst2); in Union()
57 for (ArcIterator< Fst<Arc> > aiter(fst2, s2); in Union()
60 Arc arc = aiter.Value(); in Union()
73 fst1->AddArc(start1, Arc(0, 0, Weight::One(), start2 + numstates1)); in Union()
77 fst1->AddArc(nstart1, Arc(0, 0, Weight::One(), start1)); in Union()
[all …]
Dconcat.h38 template<class Arc>
39 void Concat(MutableFst<Arc> *fst1, const Fst<Arc> &fst2) { in Concat()
40 typedef typename Arc::StateId StateId; in Concat()
41 typedef typename Arc::Label Label; in Concat()
42 typedef typename Arc::Weight Weight; in Concat()
53 for (StateIterator< Fst<Arc> > siter2(fst2); in Concat()
59 for (ArcIterator< Fst<Arc> > aiter(fst2, s2); in Concat()
62 Arc arc = aiter.Value(); in Concat()
74 fst1->AddArc(s1, Arc(0, 0, final, start2 + numstates1)); in Concat()
84 template<class Arc>
[all …]
Dstatesort.h32 template <class Arc>
33 void StateSort(MutableFst<Arc> *fst, in StateSort()
34 const vector<typename Arc::StateId> &order) { in StateSort()
35 typedef typename Arc::StateId StateId; in StateSort()
36 typedef typename Arc::Weight Weight; in StateSort()
46 vector<Arc> arcsa, arcsb; in StateSort()
47 vector<Arc> *arcs1 = &arcsa, *arcs2 = &arcsb; in StateSort()
51 for (StateIterator< MutableFst<Arc> > siter(*fst); in StateSort()
59 for (ArcIterator< MutableFst<Arc> > aiter(*fst, s1); in StateSort()
68 for (ArcIterator< MutableFst<Arc> > aiter(*fst, s2); in StateSort()
[all …]
Dequal.h27 template<class Arc>
28 bool Equal(const Fst<Arc> &fst1, const Fst<Arc> &fst2) { in Equal()
29 typedef typename Arc::StateId StateId; in Equal()
30 typedef typename Arc::Weight Weight; in Equal()
37 StateIterator< Fst<Arc> > siter1(fst1); in Equal()
38 StateIterator< Fst<Arc> > siter2(fst2); in Equal()
62 ArcIterator< Fst<Arc> > aiter1(fst1, s1); in Equal()
63 ArcIterator< Fst<Arc> > aiter2(fst2, s2); in Equal()
70 Arc arc1 = aiter1.Value(); in Equal()
71 Arc arc2 = aiter2.Value(); in Equal()
Dreweight.h38 template <class Arc>
39 void Reweight(MutableFst<Arc> *fst, vector<typename Arc::Weight> potential, in Reweight()
41 typedef typename Arc::Weight Weight; in Reweight()
58 for (StateIterator< MutableFst<Arc> > sit(*fst); in Reweight()
61 typename Arc::StateId state = sit.Value(); in Reweight()
62 for (MutableArcIterator< MutableFst<Arc> > ait(fst, state); in Reweight()
65 Arc arc = ait.Value(); in Reweight()
90 typename Arc::StateId state = fst->Start(); in Reweight()
91 for (MutableArcIterator< MutableFst<Arc> > ait(fst, state); in Reweight()
94 Arc arc = ait.Value(); in Reweight()
[all …]
Dcache.h61 using FstImpl<typename S::Arc>::Type;
66 typedef typename S::Arc Arc; typedef
67 typedef typename Arc::Weight Weight;
68 typedef typename Arc::StateId StateId;
140 cache_first_state_->arcs.capacity() * sizeof(Arc); in ExtendState()
170 void AddArc(StateId s, const Arc &arc) { in AddArc()
178 vector<Arc> &arcs = state->arcs; in SetArcs()
181 const Arc &arc = arcs[a]; in SetArcs()
192 cache_size_ += arcs.capacity() * sizeof(Arc); in SetArcs()
249 void InitArcIterator(StateId s, ArcIteratorData<Arc> *data) const { in InitArcIterator()
[all …]
Dclosure.h38 template<class Arc>
39 void Closure(MutableFst<Arc> *fst, ClosureType closure_type) { in Closure()
40 typedef typename Arc::StateId StateId; in Closure()
41 typedef typename Arc::Label Label; in Closure()
42 typedef typename Arc::Weight Weight; in Closure()
46 for (StateIterator< MutableFst<Arc> > siter(*fst); in Closure()
52 fst->AddArc(s, Arc(0, 0, final, start)); in Closure()
59 fst->AddArc(nstart, Arc(0, 0, Weight::One(), start)); in Closure()
67 template<class Arc>
68 void Closure(RationalFst<Arc> *fst, ClosureType closure_type) { in Closure()
[all …]
Drandgen.h116 template<class Arc, class ArcSelector>
117 void RandGen(const Fst<Arc> &ifst, MutableFst<Arc> *ofst, in RandGen()
119 typedef typename Arc::Weight Weight; in RandGen()
143 ArcIterator< Fst<Arc> > aiter(ifst, opts.source); in RandGen()
145 const Arc &iarc = aiter.Value(); in RandGen()
146 Arc oarc(iarc.ilabel, iarc.olabel, Weight::One(), ofst->AddState()); in RandGen()
160 template<class Arc>
161 void RandGen(const Fst<Arc> &ifst, MutableFst<Arc> *ofst) { in RandGen()
162 UniformArcSelector<Arc> uniform_selector; in RandGen()
163 RandGenOptions< UniformArcSelector<Arc> > opts(uniform_selector); in RandGen()
Dverify.h28 template<class Arc>
29 bool Verify(const Fst<Arc> &fst) { in Verify()
30 typedef typename Arc::Label Label; in Verify()
31 typedef typename Arc::Weight Weight; in Verify()
32 typedef typename Arc::StateId StateId; in Verify()
40 for (StateIterator< Fst<Arc> > siter(fst); in Verify()
53 for (StateIterator< Fst<Arc> > siter(fst); in Verify()
58 for (ArcIterator< Fst<Arc> > aiter(fst, s); in Verify()
61 const Arc &arc =aiter.Value(); in Verify()
Dexpanded-fst.h30 typedef A Arc; typedef
81 template <class Arc>
82 typename Arc::StateId CountStates(const Fst<Arc> &fst) { in CountStates()
84 const ExpandedFst<Arc> *efst = down_cast<const ExpandedFst<Arc> *>(&fst); in CountStates()
87 typename Arc::StateId nstates = 0; in CountStates()
88 for (StateIterator< Fst<Arc> > siter(fst); !siter.Done(); siter.Next()) in CountStates()
Dtest-properties.h73 template<class Arc>
74 uint64 ComputeProperties(const Fst<Arc> &fst, uint64 mask, uint64 *known, in ComputeProperties()
76 typedef typename Arc::Label Label; in ComputeProperties()
77 typedef typename Arc::Weight Weight; in ComputeProperties()
78 typedef typename Arc::StateId StateId; in ComputeProperties()
104 SccVisitor<Arc> scc_visitor(&comp_props); in ComputeProperties()
121 for (StateIterator< Fst<Arc> > siter(fst); in ComputeProperties()
126 Arc prev_arc(kNoLabel, kNoLabel, Weight::One(), 0); in ComputeProperties()
133 for (ArcIterator< Fst<Arc> > aiter(fst, s); in ComputeProperties()
136 const Arc &arc =aiter.Value(); in ComputeProperties()
[all …]
Dmutable-fst.h35 typedef A Arc; typedef
118 typedef A Arc; typedef
140 class MutableArcIterator : public MutableArcIteratorBase<typename F::Arc> {
142 typedef typename F::Arc Arc; typedef
143 typedef typename Arc::StateId StateId;
151 const Arc& Value() const { return data_.base->Value(); } in Value()
155 void SetValue(const Arc &a) { data_.base->SetValue(a); } in SetValue()
158 MutableArcIteratorData<Arc> data_;
Dreverse.h35 template<class Arc, class RevArc>
36 void Reverse(const Fst<Arc> &ifst, MutableFst<RevArc> *ofst) { in Reverse()
37 typedef typename Arc::StateId StateId; in Reverse()
38 typedef typename Arc::Weight Weight; in Reverse()
48 for (StateIterator< Fst<Arc> > siter(ifst); in Reverse()
64 for (ArcIterator< Fst<Arc> > aiter(ifst, is); in Reverse()
67 const Arc &iarc = aiter.Value(); in Reverse()
Dregister.h131 typedef typename F::Arc Arc; typedef
132 typedef typename FstRegister<Arc>::Entry Entry;
133 typedef typename FstRegister<Arc>::Reader Reader;
142 FstRegister<Arc> *registr = FstRegister<Arc>::GetRegister(); in FstRegisterer()
147 static Fst<Arc> *Convert(const Fst<Arc> &fst) { return new F(fst); } in Convert()
Dintersect.h45 typedef A Arc; typedef
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);
Ddifference.h48 typedef A Arc; typedef
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);
/external/srec/tools/grxmlcompile/
Dfst-io.h43 typedef A Arc; typedef
112 Arc arc = aiter.Value(); in PrintState()
149 template <class Arc>
152 Fst<Arc> *fst = Fst<Arc>::Read(istrm, opts);
189 FstPrinter<Arc> fstprinter(*fst, isyms, osyms, ssyms, FLAGS_acceptor);
207 typedef A Arc; typedef
239 Arc arc; in FstReader()
366 template <class Arc>
396 FstReader<Arc> fstreader(*istrm, ifilename, isyms, osyms, ssyms,
400 const Fst<Arc> *fst = &fstreader.Fst();
[all …]

12