Home | History | Annotate | Download | only in lib

Lines Matching refs:Fst

1 // const-fst.h
17 // Simple concrete immutable FST whose states and arcs are each stored
23 #include "fst/lib/expanded-fst.h"
24 #include "fst/lib/test-properties.h"
26 namespace fst {
49 explicit ConstFstImpl(const Fst<A> &fst);
99 // Properties always true of this Fst class
111 size_t narcs_; // Number of arcs (per FST)
118 ConstFstImpl<A>::ConstFstImpl(const Fst<A> &fst) : nstates_(0), narcs_(0) {
120 uint64 copy_properties = fst.Properties(kCopyProperties, true);
122 SetInputSymbols(fst.InputSymbols());
123 SetOutputSymbols(fst.OutputSymbols());
124 start_ = fst.Start();
127 for (StateIterator< Fst<A> > siter(fst);
132 for (ArcIterator< Fst<A> > aiter(fst, s);
141 states_[s].final = fst.Final(s);
146 for (ArcIterator< Fst<A> > aiter(fst, s);
219 // Simple concrete immutable FST. This class attaches interface to
233 ConstFst(const ConstFst<A> &fst) : impl_(fst.impl_) {
237 explicit ConstFst(const Fst<A> &fst) : impl_(new ConstFstImpl<A>(fst)) {}
329 ConstFstImpl<A> *impl_; // FST's impl
331 void operator=(const ConstFst<A> &fst); // disallow
334 // Specialization for ConstFst; see generic version in fst.h
342 explicit StateIterator(const ConstFst<A> &fst)
343 : nstates_(fst.impl_->NumStates()), s_(0) {}
360 // Specialization for ConstFst; see generic version in fst.h
368 ArcIterator(const ConstFst<A> &fst, StateId s)
369 : arcs_(fst.impl_->Arcs(s)), narcs_(fst.impl_->NumArcs(s)), i_(0) {}
392 } // namespace fst;