Lines Matching full:tuple
185 // of state tuple lookup, i.e. a bijective mapping from triples of two
190 // to the value associated with x. If x is an unassigned tuple, the
195 // ComposeFstImpl. The value stored in the table is equal to tuple ID
197 // table[x] is equal to 0 if and only if x is an unassigned tuple (in
201 // ID))" if x is an unassigned tuple.
222 // NB: if 'tuple' is not in 'table_', the pair (tuple, StateId()) is
226 StateId &operator[](const StateTuple &tuple) {
227 return table_[tuple];
266 // State tuple lookup table for the composition of a string FST with a
270 // and those of the resulting (string) FST, a state tuple (s1, s2) is
295 // with 'tuple', inserting a 0 value if 'tuple' is unassigned.
296 StateId &operator[](const StateTuple &tuple) {
297 StateId index = Fst1IsString ? tuple.state_id1 : tuple.state_id2;
415 // associative container state_tuple_table_ are of the form (tuple,
416 // id(tuple) + 1), i.e. state_tuple_table_[tuple] > 0 if tuple has
418 // state_tuple_table_[tuple] creates a new pair (tuple, 0). As a
419 // result, state_tuple_table_[tuple] == 0 iff tuple is new.
420 StateId FindState(const StateTuple& tuple) {
421 StateId &assoc_value = state_tuple_table_[tuple];
422 if (assoc_value == 0) { // tuple wasn't present in lookup table:
424 state_tuples_.push_back(tuple);
438 StateTuple tuple(arcb.nextstate, arca.nextstate, f);
439 arc.nextstate = FindState(tuple);
444 StateTuple tuple(arca.nextstate, arcb.nextstate, f);
445 arc.nextstate = FindState(tuple);
453 StateTuple &tuple = state_tuples_[s];
454 tuple.state_id1;
455 StateId s2 = tuple.state_id2;
456 int f = tuple.filt;
627 StateTuple tuple(s1, s2, 0);
628 return FindState(tuple);
632 StateTuple &tuple = state_tuples_[s];
633 Weight final = Times(ComposeFstImplBase<A>::fst1_->Final(tuple.state_id1),
634 ComposeFstImplBase<A>::fst2_->Final(tuple.state_id2));