Home | History | Annotate | Download | only in fst

Lines Matching refs:FST

1 // mutable-fst.h
19 // Expanded FST augmented with mutators - interface class definition
32 #include <fst/expanded-fst.h>
35 namespace fst {
39 // An expanded FST plus mutators (use MutableArcIterator to modify arcs).
47 virtual MutableFst<A> &operator=(const Fst<A> &fst) = 0;
49 MutableFst<A> &operator=(const MutableFst<A> &fst) {
50 return operator=(static_cast<const Fst<A> &>(fst));
84 // Get a copy of this MutableFst. See Fst<>::Copy() for further doc.
106 LOG(ERROR) << "MutableFst::Read: Unknown FST type \"" << hdr.FstType()
111 Fst<A> *fst = reader(strm, ropts);
112 if (!fst) return 0;
113 return static_cast<MutableFst<A> *>(fst);
118 // convert to a mutable FST of type 'convert_type' if file is
119 // a non-mutable FST.
134 Fst<A> *ifst = Fst<A>::Read(filename);
139 Fst<A> *ofst = Convert(*ifst, convert_type);
174 // Generic mutable arc iterator, templated on the FST definition
177 // for (MutableArcIterator<StdFst> aiter(&fst, s));
189 typedef F FST;
193 MutableArcIterator(F *fst, StateId s) {
194 fst->InitMutableArcIterator(s, &data_);
220 typename A::Weight Final(const MutableFst<A> &fst, typename A::StateId s) {
221 return fst.Final(s);
225 ssize_t NumArcs(const MutableFst<A> &fst, typename A::StateId s) {
226 return fst.NumArcs(s);
230 ssize_t NumInputEpsilons(const MutableFst<A> &fst, typename A::StateId s) {
231 return fst.NumInputEpsilons(s);
235 ssize_t NumOutputEpsilons(const MutableFst<A> &fst, typename A::StateId s) {
236 return fst.NumOutputEpsilons(s);
352 ImplToMutableFst(const ImplToMutableFst<I, F> &fst)
353 : ImplToExpandedFst<I, F>(fst) {}
355 ImplToMutableFst(const ImplToMutableFst<I, F> &fst, bool safe)
356 : ImplToExpandedFst<I, F>(fst, safe) {}
366 ImplToMutableFst<I, F> &operator=(const ImplToMutableFst<I, F> &fst);
368 ImplToMutableFst<I, F> &operator=(const Fst<Arc> &fst) {
376 } // namespace fst