Home | History | Annotate | Download | only in lib

Lines Matching refs:VectorFst

31 template <class A> class VectorFst;
186 friend class MutableArcIterator< VectorFst<A> >;
366 LOG(ERROR) << "VectorFst::Read: read failed: " << opts.source;
377 LOG(ERROR) << "VectorFst::Read: read failed: " << opts.source;
399 LOG(FATAL) << "VectorFst::Read: Obsolete file format";
444 LOG(ERROR) << "VectorFst::Write: write failed: " << opts.source;
453 class VectorFst : public MutableFst<A> {
455 friend class StateIterator< VectorFst<A> >;
456 friend class ArcIterator< VectorFst<A> >;
457 friend class MutableArcIterator< VectorFst<A> >;
463 VectorFst() : impl_(new VectorFstImpl<A>) {}
465 VectorFst(const VectorFst<A> &fst) : MutableFst<A>(fst), impl_(fst.impl_) {
468 explicit VectorFst(const Fst<A> &fst) : impl_(new VectorFstImpl<A>(fst)) {}
470 virtual ~VectorFst() { if (!impl_->DecrRefCount()) delete impl_; }
472 VectorFst<A> &operator=(const VectorFst<A> &fst) {
481 virtual VectorFst<A> &operator=(const Fst<A> &fst) {
517 // Get a copy of this VectorFst
518 virtual VectorFst<A> *Copy() const {
520 return new VectorFst<A>(impl_);
523 // Read a VectorFst from an input stream; return NULL on error
524 static VectorFst<A> *Read(istream &strm, const FstReadOptions &opts) {
526 return impl ? new VectorFst<A>(impl) : 0;
529 // Read a VectorFst from a file; return NULL on error
530 static VectorFst<A> *Read(const string &filename) {
533 LOG(ERROR) << "VectorFst::Read: Can't open file: " << filename;
539 // Write a VectorFst to an output stream; return false on error
544 // Write a VectorFst to a file; return false on error
549 VectorFst::Write: Can't open file: " << filename;
650 explicit VectorFst(VectorFstImpl<A> *impl) : impl_(impl) {}
663 // Specialization for VectorFst; see generic version in fst.h
664 // for sample usage (but use the VectorFst type!). This version
667 class StateIterator< VectorFst<A> > {
671 explicit StateIterator(const VectorFst<A> &fst)
689 // Specialization for VectorFst; see generic version in fst.h
690 // for sample usage (but use the VectorFst type!). This version
693 class ArcIterator< VectorFst<A> > {
697 ArcIterator(const VectorFst<A> &fst, StateId s)
717 // Specialization for VectorFst; see generic version in fst.h
718 // for sample usage (but use the VectorFst type!). This version
721 class MutableArcIterator< VectorFst<A> >
727 MutableArcIterator(VectorFst<A> *fst, StateId s) : i_(0) {
788 void VectorFst<A>::InitMutableArcIterator(
790 data->base = new MutableArcIterator< VectorFst<A> >(this, s);
794 typedef VectorFst<StdArc> StdVectorFst;