/external/openfst/src/include/fst/script/ |
D | fstscript.h | 79 template<class Arc> 89 REGISTER_FST_OPERATION(ArcSort, Arc, ArcSortArgs); in RegisterBatch1() 90 REGISTER_FST_OPERATION(Closure, Arc, ClosureArgs); in RegisterBatch1() 91 REGISTER_FST_OPERATION(CompileFst, Arc, FstCompileArgs); in RegisterBatch1() 92 REGISTER_FST_OPERATION(Compose, Arc, ComposeArgs1); in RegisterBatch1() 93 REGISTER_FST_OPERATION(Compose, Arc, ComposeArgs2); in RegisterBatch1() 94 REGISTER_FST_OPERATION(Concat, Arc, ConcatArgs1); in RegisterBatch1() 95 REGISTER_FST_OPERATION(Concat, Arc, ConcatArgs2); in RegisterBatch1() 96 REGISTER_FST_OPERATION(Connect, Arc, MutableFstClass); in RegisterBatch1() 97 REGISTER_FST_OPERATION(Convert, Arc, ConvertArgs); in RegisterBatch1() [all …]
|
D | shortest-distance.h | 57 template<class Queue, class Arc, class ArcFilter> 60 static Queue *Construct(const Fst<Arc> &, in Construct() 61 const vector<typename Arc::Weight> *) { in Construct() 68 template<class Arc, class ArcFilter> 69 struct QueueConstructor<AutoQueue<typename Arc::StateId>, Arc, ArcFilter> { 71 static AutoQueue<typename Arc::StateId> *Construct( 72 const Fst<Arc> &fst, 73 const vector<typename Arc::Weight> *distance) { 74 return new AutoQueue<typename Arc::StateId>(fst, distance, ArcFilter()); 78 template<class Arc, class ArcFilter> [all …]
|
D | fst-class.h | 76 template<class Arc> 79 explicit FstClassImpl(Fst<Arc> *impl, 84 return Arc::Type(); in ArcType() 92 return Arc::Weight::Type(); in WeightType() 105 static_cast<MutableFst<Arc> *>(impl_)->SetInputSymbols(is); in SetInputSymbols() 110 static_cast<MutableFst<Arc> *>(impl_)->SetOutputSymbols(os); in SetOutputSymbols() 123 Fst<Arc> *GetImpl() { return impl_; } in GetImpl() 126 return new FstClassImpl<Arc>(impl_); in Copy() 130 Fst<Arc> *impl_; 141 template<class Arc> [all …]
|
D | prune.h | 78 template<class Arc> 80 MutableFst<Arc> *ofst = args->arg1->GetMutableFst<Arc>(); in Prune() 82 typedef typename Arc::Weight Weight; in Prune() 83 typedef typename Arc::StateId StateId; in Prune() 85 fst::PruneOptions<Arc, AnyArcFilter<Arc> > opts = in Prune() 86 ConvertPruneOptions<Arc>(args->arg2); in Prune() 95 template<class Arc> 97 const Fst<Arc>& ifst = *(args->arg1.GetFst<Arc>()); in Prune() 98 MutableFst<Arc> *ofst = args->arg2->GetMutableFst<Arc>(); in Prune() 100 fst::PruneOptions<Arc, AnyArcFilter<Arc> > opts = in Prune() [all …]
|
D | rmepsilon.h | 64 template<class Arc> 65 void RmEpsilonHelper(MutableFst<Arc> *fst, in RmEpsilonHelper() 66 vector<typename Arc::Weight> *distance, in RmEpsilonHelper() 68 typedef typename Arc::StateId StateId; in RmEpsilonHelper() 69 typedef typename Arc::Weight Weight; in RmEpsilonHelper() 71 typename Arc::Weight weight_thresh = in RmEpsilonHelper() 76 AutoQueue<StateId> queue(*fst, distance, EpsilonArcFilter<Arc>()); in RmEpsilonHelper() 77 fst::RmEpsilonOptions<Arc, AutoQueue<StateId> > ropts( in RmEpsilonHelper() 85 fst::RmEpsilonOptions<Arc, FifoQueue<StateId> > ropts( in RmEpsilonHelper() 93 fst::RmEpsilonOptions<Arc, LifoQueue<StateId> > ropts( in RmEpsilonHelper() [all …]
|
D | shortest-path.h | 56 template<class Arc> 58 const Fst<Arc> &ifst = *(args->arg1.GetFst<Arc>()); in ShortestPath() 59 MutableFst<Arc> *ofst = args->arg2->GetMutableFst<Arc>(); in ShortestPath() 61 typedef typename Arc::StateId StateId; in ShortestPath() 62 typedef typename Arc::Weight Weight; in ShortestPath() 63 typedef AnyArcFilter<Arc> ArcFilter; in ShortestPath() 65 vector<typename Arc::Weight> weights; in ShortestPath() 66 typename Arc::Weight weight_threshold = in ShortestPath() 72 Queue *queue = QueueConstructor<Queue, Arc, in ShortestPath() 74 fst::ShortestPathOptions<Arc, Queue, ArcFilter> spopts( in ShortestPath() [all …]
|
D | intersect.h | 31 template<class Arc> 33 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>()); in Intersect() 34 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>()); in Intersect() 35 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>(); in Intersect() 43 template<class Arc> 45 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>()); in Intersect() 46 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>()); in Intersect() 47 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>(); in Intersect()
|
D | compose.h | 30 template<class Arc> 32 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>()); in Compose() 33 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>()); in Compose() 34 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>(); in Compose() 44 template<class Arc> 46 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>()); in Compose() 47 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>()); in Compose() 48 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>(); in Compose()
|
D | difference.h | 31 template<class Arc> 33 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>()); in Difference() 34 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>()); in Difference() 35 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>(); in Difference() 43 template<class Arc> 45 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>()); in Difference() 46 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>()); in Difference() 47 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>(); in Difference()
|
/external/openfst/src/test/ |
D | algo_test.h | 62 template <class Arc, class WeightGenerator> 65 typedef typename Arc::Label Label; 66 typedef typename Arc::StateId StateId; 67 typedef typename Arc::Weight Weight; 69 WeightedTester(int seed, const Fst<Arc> &zero_fst, const Fst<Arc> &one_fst, in WeightedTester() 70 const Fst<Arc> &univ_fst, WeightGenerator *weight_generator) in WeightedTester() 74 void Test(const Fst<Arc> &T1, const Fst<Arc> &T2, const Fst<Arc> &T3) { in Test() 85 void TestRational(const Fst<Arc> &T1, const Fst<Arc> &T2, in TestRational() 86 const Fst<Arc> &T3) { in TestRational() 90 VectorFst<Arc> U1(T1); in TestRational() [all …]
|
/external/openfst/src/include/fst/ |
D | push.h | 43 template <class Arc> 44 typename Arc::Weight ComputeTotalWeight( in ComputeTotalWeight() 45 const Fst<Arc> &fst, in ComputeTotalWeight() 46 const vector<typename Arc::Weight> &distance, in ComputeTotalWeight() 50 distance[fst.Start()] : Arc::Weight::Zero(); in ComputeTotalWeight() 52 typename Arc::Weight sum = Arc::Weight::Zero(); in ComputeTotalWeight() 53 for (typename Arc::StateId s = 0; s < distance.size(); ++s) in ComputeTotalWeight() 61 template <class Arc> 62 void RemoveWeight(MutableFst<Arc> *fst, typename Arc::Weight w, bool at_final) { in RemoveWeight() 63 if ((w == Arc::Weight::One()) || (w == Arc::Weight::Zero())) in RemoveWeight() [all …]
|
D | replace-util.h | 43 template <class Arc> 44 void Replace(const vector<pair<typename Arc::Label, const Fst<Arc>* > >&, 45 MutableFst<Arc> *, typename Arc::Label, bool); 54 template <class Arc> 57 typedef typename Arc::Label Label; 58 typedef typename Arc::Weight Weight; 59 typedef typename Arc::StateId StateId; 61 typedef pair<Label, const Fst<Arc>*> FstPair; 62 typedef pair<Label, MutableFst<Arc>*> MutableFstPair; 74 ReplaceUtil(const vector<const Fst<Arc> *> &fst_array, [all …]
|
D | randequivalent.h | 43 template<class Arc, class ArcSelector> 44 bool RandEquivalent(const Fst<Arc> &fst1, const Fst<Arc> &fst2, 48 typedef typename Arc::Weight Weight; 61 ILabelCompare<Arc> icomp; 62 OLabelCompare<Arc> ocomp; 63 VectorFst<Arc> sfst1(fst1); 64 VectorFst<Arc> sfst2(fst2); 72 VectorFst<Arc> path; 73 const Fst<Arc> &fst = rand() % 2 ? sfst1 : sfst2; 76 VectorFst<Arc> ipath(path); [all …]
|
D | lookahead-matcher.h | 135 typedef A Arc; typedef 148 bool LookAheadFst(const Fst<Arc> &fst, StateId s) { in LookAheadFst() 154 bool LookAheadPrefix(Arc *arc) const { in LookAheadPrefix() 163 virtual void InitLookAheadFst(const Fst<Arc>& fst, bool copy = false) = 0; 168 void SetLookAheadPrefix(const Arc &arc) { prefix_arc_ = arc; } in SetLookAheadPrefix() 174 virtual bool LookAheadFst_(const Fst<Arc> &fst, 178 Arc prefix_arc_; // Look-ahead prefix arc 185 : public LookAheadMatcherBase<typename M::FST::Arc> { 188 typedef typename M::Arc Arc; typedef 189 typedef typename Arc::StateId StateId; [all …]
|
D | shortest-distance.h | 37 template <class Arc, class Queue, class ArcFilter> 39 typedef typename Arc::StateId StateId; 70 template<class Arc, class Queue, class ArcFilter> 73 typedef typename Arc::StateId StateId; 74 typedef typename Arc::Weight Weight; 77 const Fst<Arc> &fst, in ShortestDistanceState() 79 const ShortestDistanceOptions<Arc, Queue, ArcFilter> &opts, in ShortestDistanceState() argument 95 const Fst<Arc> &fst_; 114 template <class Arc, class Queue, class ArcFilter> 115 void ShortestDistanceState<Arc, Queue, ArcFilter>::ShortestDistance( in ShortestDistance() [all …]
|
D | equivalent.h | 53 template <class Arc> 55 typedef typename Arc::StateId StateId; 56 typedef typename Arc::Weight Weight; 82 static bool IsFinal(const Fst<Arc> &fa, MappedId s) { in IsFinal() 100 template <class Arc> const 101 typename EquivalenceUtil<Arc>::MappedId EquivalenceUtil<Arc>::kDeadState; 103 template <class Arc> const 104 typename EquivalenceUtil<Arc>::MappedId EquivalenceUtil<Arc>::kInvalidId; 128 template <class Arc> 129 bool Equivalent(const Fst<Arc> &fst1, [all …]
|
D | concat.h | 46 template<class Arc> 47 void Concat(MutableFst<Arc> *fst1, const Fst<Arc> &fst2) { in Concat() 48 typedef typename Arc::StateId StateId; in Concat() 49 typedef typename Arc::Label Label; in Concat() 50 typedef typename Arc::Weight Weight; in Concat() 75 for (StateIterator< Fst<Arc> > siter2(fst2); in Concat() 82 for (ArcIterator< Fst<Arc> > aiter(fst2, s2); in Concat() 85 Arc arc = aiter.Value(); in Concat() 97 fst1->AddArc(s1, Arc(0, 0, final, start2 + numstates1)); in Concat() 112 template<class Arc> [all …]
|
D | rmepsilon.h | 48 template <class Arc, class Queue> 50 : public ShortestDistanceOptions<Arc, Queue, EpsilonArcFilter<Arc> > { 52 typedef typename Arc::StateId StateId; 53 typedef typename Arc::Weight Weight; 62 : ShortestDistanceOptions< Arc, Queue, EpsilonArcFilter<Arc> >( 63 q, EpsilonArcFilter<Arc>(), kNoStateId, d), 70 template <class Arc, class Queue> 73 typedef typename Arc::Label Label; 74 typedef typename Arc::StateId StateId; 75 typedef typename Arc::Weight Weight; [all …]
|
/external/openfst/src/include/fst/extensions/pdt/ |
D | compose.h | 30 template <class Arc, bool left_pdt = true> 32 ComposeFstOptions<Arc, 33 MultiEpsMatcher< Matcher<Fst<Arc> > >, 36 Matcher<Fst<Arc> > > > > > { 38 typedef typename Arc::Label Label; 39 typedef MultiEpsMatcher< Matcher<Fst<Arc> > > PdtMatcher; 41 typedef ComposeFstOptions<Arc, PdtMatcher, PdtFilter> COptions; 46 PdtComposeOptions(const Fst<Arc> &ifst1, in PdtComposeOptions() 48 const Fst<Arc> &ifst2) { in PdtComposeOptions() 66 template <class Arc> [all …]
|
D | shortest-path.h | 40 template <class Arc, class Queue> 65 template <class Arc> 70 typedef typename Arc::StateId StateId; 71 typedef typename Arc::Weight Weight; 72 typedef typename Arc::Label Label; 216 static const Arc kNoArc; 300 template<class Arc> 301 void PdtShortestPathData<Arc>::GC(StateId start) { in GC() 347 template<class Arc> const Arc PdtShortestPathData<Arc>::kNoArc 348 = Arc(kNoLabel, kNoLabel, Weight::Zero(), kNoStateId); [all …]
|
D | pdtscript.h | 54 template<class Arc> 56 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>()); in PdtCompose() 57 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>()); in PdtCompose() 58 MutableFst<Arc> *ofst = args->arg4->GetMutableFst<Arc>(); in PdtCompose() 60 vector<pair<typename Arc::Label, typename Arc::Label> > parens( in PdtCompose() 98 template<class Arc> 100 const Fst<Arc> &fst = *(args->arg1.GetFst<Arc>()); in PdtExpand() 101 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>(); in PdtExpand() 103 vector<pair<typename Arc::Label, typename Arc::Label> > parens( in PdtExpand() 110 ExpandOptions<Arc>( in PdtExpand() [all …]
|
/external/srec/tools/thirdparty/OpenFst/fst/lib/ |
D | push.h | 40 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 …]
|
D | prune.h | 55 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 …]
|
D | dfs-visit.h | 63 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 …]
|
D | shortest-distance.h | 33 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 …]
|