Home | History | Annotate | Download | only in lib

Lines Matching refs:Fst

17 // An Fst implementation and base interface for delayed unions,
23 #include "fst/lib/map.h"
24 #include "fst/lib/mutable-fst.h"
25 #include "fst/lib/replace.h"
26 #include "fst/lib/test-properties.h"
28 namespace fst {
37 template <class A> void Union(RationalFst<A> *fst1, const Fst<A> &fst2);
38 template <class A> void Concat(RationalFst<A> *fst1, const Fst<A> &fst2);
39 template <class A> void Closure(RationalFst<A> *fst, ClosureType closure_type);
63 void InitUnion(const Fst<A> &fst1, const Fst<A> &fst2) {
85 void InitConcat(const Fst<A> &fst1, const Fst<A> &fst2) {
107 // Implementation of ClosureFst(fst, closure_type)
108 void InitClosure(const Fst<A> &fst, ClosureType closure_type) {
109 uint64 props = fst.Properties(kFstProperties, false);
110 SetInputSymbols(fst.InputSymbols());
111 SetOutputSymbols(fst.OutputSymbols());
125 rfst_.SetInputSymbols(fst.InputSymbols());
126 rfst_.SetOutputSymbols(fst.OutputSymbols());
128 AddFst(-1, &fst);
135 // Implementation of Union(Fst &, RationalFst *)
136 void AddUnion(const Fst<A> &fst) {
138 uint64 props2 = fst.Properties(kFstProperties, false);
151 // Implementation of Concat(Fst &, RationalFst *)
152 void AddConcat(const Fst<A> &fst) {
154 uint64 props2 = fst.Properties(kFstProperties, false);
187 class RationalFst : public Fst<A> {
192 friend void Union<>(RationalFst<A> *fst1, const Fst<A> &fst2);
193 friend void Concat<>(RationalFst<A> *fst1, const Fst<A> &fst2);
194 friend void Closure<>(RationalFst<A> *fst, ClosureType closure_type);
239 RationalFst(const RationalFst<A> &fst) : impl_(fst.impl_) {
250 void operator=(const RationalFst<A> &fst); // disallow
258 explicit StateIterator(const RationalFst<A> &fst)
259 : CacheStateIterator< RationalFst<A> >(fst) {}
269 ArcIterator(const RationalFst<A> &fst, StateId s)
270 : CacheArcIterator< RationalFst<A> >(fst, s) {
271 if (!fst.impl_->HasArcs(s))
272 fst.impl_->Expand(s);
284 } // namespace fst