#include <fst/compact-fst.h>
Inherits ImplToExpandedFst< CompactFstImpl< A, C, U > >.

Public Types | |
| typedef A | Arc |
| typedef A::StateId | StateId |
| typedef CompactFstImpl< A, C, U > | Impl |
| typedef CacheState< A > | State |
| typedef U | Unsigned |
Public Member Functions | |
| template<class F , class G > | |
| void friend | Cast (const F &, G *) |
| CompactFst () | |
| CompactFst (const Fst< A > &fst, const C &compactor=C(), const CompactFstOptions &opts=CompactFstOptions()) | |
| CompactFst (const Fst< A > &fst, C *compactor, const CompactFstOptions &opts=CompactFstOptions()) | |
| template<class Iterator > | |
| CompactFst (const Iterator &begin, const Iterator &end, const C &compactor=C(), const CompactFstOptions &opts=CompactFstOptions()) | |
| template<class Iterator > | |
| CompactFst (const Iterator &begin, const Iterator &end, C *compactor, const CompactFstOptions &opts=CompactFstOptions()) | |
| CompactFst (const CompactFst< A, C, U > &fst, bool safe=false) | |
| See Fst<>::Copy() for doc. | |
| virtual CompactFst< A, C, U > * | Copy (bool safe=false) const |
| Get a copy of this CompactFst. See Fst<>::Copy() for further doc. | |
| virtual void | InitStateIterator (StateIteratorData< A > *data) const |
| virtual void | InitArcIterator (StateId s, ArcIteratorData< A > *data) const |
| virtual MatcherBase< A > * | InitMatcher (MatchType match_type) const |
| template<class Iterator > | |
| void | SetCompactElements (const Iterator &b, const Iterator &e) |
Static Public Member Functions | |
| static CompactFst< A, C, U > * | Read (istream &strm, const FstReadOptions &opts) |
| Read a CompactFst from an input stream; return NULL on error. | |
| static CompactFst< A, C, U > * | Read (const string &filename) |
Friends | |
| class | StateIterator< CompactFst< A, C, U > > |
| class | ArcIterator< CompactFst< A, C, U > > |
CompactFst. This class attaches interface to implementation and handles reference counting, delegating most methods to ImplToExpandedFst. The unsigned type U is used to represent indices into the compact arc array (uint32 by default, declared in fst-decl.h).
Definition at line 706 of file compact-fst.h.
| typedef A fst::CompactFst< A, C, U >::Arc |
Reimplemented from fst::ImplToExpandedFst< CompactFstImpl< A, C, U > >.
Definition at line 712 of file compact-fst.h.
| typedef CompactFstImpl<A, C, U> fst::CompactFst< A, C, U >::Impl |
Definition at line 714 of file compact-fst.h.
| typedef CacheState<A> fst::CompactFst< A, C, U >::State |
Definition at line 715 of file compact-fst.h.
| typedef A::StateId fst::CompactFst< A, C, U >::StateId |
Reimplemented from fst::ImplToExpandedFst< CompactFstImpl< A, C, U > >.
Definition at line 713 of file compact-fst.h.
| typedef U fst::CompactFst< A, C, U >::Unsigned |
Definition at line 716 of file compact-fst.h.
| fst::CompactFst< A, C, U >::CompactFst | ( | ) | [inline] |
Definition at line 718 of file compact-fst.h.
| fst::CompactFst< A, C, U >::CompactFst | ( | const Fst< A > & | fst, | |
| const C & | compactor = C(), |
|||
| const CompactFstOptions & | opts = CompactFstOptions() | |||
| ) | [inline, explicit] |
Definition at line 720 of file compact-fst.h.
| fst::CompactFst< A, C, U >::CompactFst | ( | const Fst< A > & | fst, | |
| C * | compactor, | |||
| const CompactFstOptions & | opts = CompactFstOptions() | |||
| ) | [inline] |
Definition at line 724 of file compact-fst.h.
| fst::CompactFst< A, C, U >::CompactFst | ( | const Iterator & | begin, | |
| const Iterator & | end, | |||
| const C & | compactor = C(), |
|||
| const CompactFstOptions & | opts = CompactFstOptions() | |||
| ) | [inline, explicit] |
The following 2 constructors take as input two iterators delimiting a set of (already) compacted transitions, starting with the transitions out of the initial state. The format of the input differs for fixed out-degree and variable out-degree compactors.
These 2 constructors allows the direct construction of a CompactFst without first creating a more memory hungry 'regular' FST. This is useful when memory usage is severely constrained.
Definition at line 748 of file compact-fst.h.
| fst::CompactFst< A, C, U >::CompactFst | ( | const Iterator & | begin, | |
| const Iterator & | end, | |||
| C * | compactor, | |||
| const CompactFstOptions & | opts = CompactFstOptions() | |||
| ) | [inline] |
Definition at line 754 of file compact-fst.h.
| fst::CompactFst< A, C, U >::CompactFst | ( | const CompactFst< A, C, U > & | fst, | |
| bool | safe = false | |||
| ) | [inline] |
See Fst<>::Copy() for doc.
Definition at line 759 of file compact-fst.h.
| void friend fst::CompactFst< A, C, U >::Cast | ( | const F & | , | |
| G * | ||||
| ) |
| virtual CompactFst<A, C, U>* fst::CompactFst< A, C, U >::Copy | ( | bool | safe = false |
) | const [inline, virtual] |
Get a copy of this CompactFst. See Fst<>::Copy() for further doc.
Implements fst::ExpandedFst< typename CompactFstImpl< A, C, U >::Arc >.
Definition at line 763 of file compact-fst.h.
| virtual void fst::CompactFst< A, C, U >::InitArcIterator | ( | StateId | s, | |
| ArcIteratorData< A > * | data | |||
| ) | const [inline, virtual] |
Definition at line 784 of file compact-fst.h.
| virtual MatcherBase<A>* fst::CompactFst< A, C, U >::InitMatcher | ( | MatchType | match_type | ) | const [inline, virtual] |
For generic matcher construction; not normally called directly by users.
Reimplemented from fst::Fst< typename CompactFstImpl< A, C, U >::Arc >.
Definition at line 788 of file compact-fst.h.
| virtual void fst::CompactFst< A, C, U >::InitStateIterator | ( | StateIteratorData< A > * | data | ) | const [inline, virtual] |
Definition at line 780 of file compact-fst.h.
| static CompactFst<A, C, U>* fst::CompactFst< A, C, U >::Read | ( | const string & | filename | ) | [inline, static] |
Read a CompactFst from a file; return NULL on error Empty filename reads from standard input
Reimplemented from fst::ImplToExpandedFst< CompactFstImpl< A, C, U > >.
Definition at line 775 of file compact-fst.h.
| static CompactFst<A, C, U>* fst::CompactFst< A, C, U >::Read | ( | istream & | strm, | |
| const FstReadOptions & | opts | |||
| ) | [inline, static] |
Read a CompactFst from an input stream; return NULL on error.
Reimplemented from fst::ExpandedFst< typename CompactFstImpl< A, C, U >::Arc >.
Definition at line 768 of file compact-fst.h.
| void fst::CompactFst< A, C, U >::SetCompactElements | ( | const Iterator & | b, | |
| const Iterator & | e | |||
| ) | [inline] |
Definition at line 793 of file compact-fst.h.
friend class ArcIterator< CompactFst< A, C, U > > [friend] |
Definition at line 709 of file compact-fst.h.
friend class StateIterator< CompactFst< A, C, U > > [friend] |
Definition at line 708 of file compact-fst.h.
1.7.1