#include <fst/encode.h>

Classes | |
| struct | Tuple |
| Encoded data consists of arc input/output labels and arc weight. More... | |
| class | TupleEqual |
| Comparison object for hashing EncodeTable Tuple(s). More... | |
| class | TupleKey |
Public Types | |
| typedef A::Label | Label |
| typedef A::Weight | Weight |
| typedef unordered_map< const Tuple *, Label, TupleKey, TupleEqual > | EncodeHash |
Public Member Functions | |
| EncodeTable (uint32 encode_flags) | |
| ~EncodeTable () | |
| Label | Encode (const A &arc) |
| Given an arc encode either input/ouptut labels or input/costs or both. | |
| Label | GetLabel (const A &arc) const |
| Given an arc, look up its encoded label. Returns kNoLabel if not found. | |
| const Tuple * | Decode (Label key) const |
| Given an encode arc Label decode back to input/output labels and costs. | |
| size_t | Size () const |
| bool | Write (ostream &strm, const string &source) const |
| const uint32 | flags () const |
| int | RefCount () const |
| int | IncrRefCount () |
| int | DecrRefCount () |
| SymbolTable * | InputSymbols () const |
| SymbolTable * | OutputSymbols () const |
| void | SetInputSymbols (const SymbolTable *syms) |
| void | SetOutputSymbols (const SymbolTable *syms) |
Static Public Member Functions | |
| static EncodeTable< A > * | Read (istream &strm, const string &source) |
The following class encapsulates implementation details for the encoding and decoding of label/weight tuples used for encoding and decoding of Fsts. The EncodeTable is bidirectional. I.E it stores both the Tuple of encode labels and weights to a unique label, and the reverse.
Definition at line 54 of file encode.h.
| typedef unordered_map<const Tuple*, Label, TupleKey, TupleEqual> fst::EncodeTable< A >::EncodeHash |
| typedef A::Label fst::EncodeTable< A >::Label |
| typedef A::Weight fst::EncodeTable< A >::Weight |
| fst::EncodeTable< A >::EncodeTable | ( | uint32 | encode_flags | ) | [inline, explicit] |
| fst::EncodeTable< A >::~EncodeTable | ( | ) | [inline] |
| const Tuple* fst::EncodeTable< A >::Decode | ( | Label | key | ) | const [inline] |
| int fst::EncodeTable< A >::DecrRefCount | ( | ) | [inline] |
| Label fst::EncodeTable< A >::Encode | ( | const A & | arc | ) | [inline] |
| const uint32 fst::EncodeTable< A >::flags | ( | ) | const [inline] |
| Label fst::EncodeTable< A >::GetLabel | ( | const A & | arc | ) | const [inline] |
| int fst::EncodeTable< A >::IncrRefCount | ( | ) | [inline] |
| SymbolTable* fst::EncodeTable< A >::InputSymbols | ( | ) | const [inline] |
| SymbolTable* fst::EncodeTable< A >::OutputSymbols | ( | ) | const [inline] |
| EncodeTable< A > * fst::EncodeTable< A >::Read | ( | istream & | strm, | |
| const string & | source | |||
| ) | [inline, static] |
| int fst::EncodeTable< A >::RefCount | ( | ) | const [inline] |
| void fst::EncodeTable< A >::SetInputSymbols | ( | const SymbolTable * | syms | ) | [inline] |
| void fst::EncodeTable< A >::SetOutputSymbols | ( | const SymbolTable * | syms | ) | [inline] |
| size_t fst::EncodeTable< A >::Size | ( | ) | const [inline] |
| bool fst::EncodeTable< A >::Write | ( | ostream & | strm, | |
| const string & | source | |||
| ) | const [inline] |
1.7.1