Home | History | Annotate | Download | only in lib

Lines Matching defs:Tuple

39 // stores both the Tuple of encode labels and weights to a unique
47 struct Tuple {
48 Tuple() {}
49 Tuple(Label ilabel_, Label olabel_, Weight weight_)
51 Tuple(const Tuple& tuple)
52 : ilabel(tuple.ilabel), olabel(tuple.olabel), weight(tuple.weight) {}
59 // Comparison object for hashing EncodeTable Tuple(s).
62 bool operator()(const Tuple* x, const Tuple* y) const {
83 size_t operator()(const Tuple* x) const {
96 typedef hash_map<const Tuple*,
113 const Tuple tuple(arc.ilabel,
116 typename EncodeHash::const_iterator it = encode_hash_.find(&tuple);
118 encode_tuples_.push_back(new Tuple(tuple));
127 const Tuple* Decode(Label key) {
137 const Tuple* tuple = encode_tuples_[i];
138 WriteType(strm, tuple->ilabel);
139 WriteType(strm, tuple->olabel);
140 tuple->weight.Write(strm);
165 Tuple* tuple = new Tuple();
166 ReadType(strm, &tuple->ilabel);
167 ReadType(strm, &tuple->olabel);
168 tuple->weight.Read(strm);
169 encode_tuples_.push_back(tuple);
180 vector<Tuple*> encode_tuples_;
247 const typename EncodeTable<A>::Tuple* tuple =
249 return A(tuple->ilabel,
250 flags_ & kEncodeLabels ? tuple->olabel : arc.olabel,
251 flags_ & kEncodeWeights ? tuple->weight : arc.weight,