Home | History | Annotate | Download | only in fst

Lines Matching refs:Tuple

66 //   // Lookup state ID by tuple. If it doesn't exist, then add it.
67 // StateId FindState(const StateTuple &tuple);
69 // // Lookup state tuple by ID.
70 // const StateTuple &Tuple(StateId id) const;
75 // \brief Tuple of information that uniquely defines a state in replace
109 bool operator()(const ReplaceStateTuple<S, P> &tuple) const {
110 return tuple.prefix_id == 0;
123 uint64 operator()(const ReplaceStateTuple<S, P> &tuple) const {
124 return tuple.prefix_id * (cumulative_size_array_->back()) +
125 cumulative_size_array_->at(tuple.fst_id - 1) +
126 tuple.fst_state;
135 // Useful when the fst_state uniquely define the tuple.
139 uint64 operator()(const ReplaceStateTuple<S, P>& tuple) const {
140 return tuple.fst_state;
220 StateId FindState(const StateTuple &tuple) {
221 return state_table_->FindState(tuple);
224 const StateTuple &Tuple(StateId id) const {
225 return state_table_->Tuple(id);
251 using StateTable::Tuple;
401 << opts.root << "' in the input tuple vector";
499 const StateTuple& tuple = state_table_->Tuple(s);
500 const StackPrefix& stack = stackprefix_array_[tuple.prefix_id];
501 const Fst<A>* fst = fst_array_[tuple.fst_id];
502 StateId fst_state = tuple.fst_state;
519 StateTuple tuple = state_table_->Tuple(s);
520 if (tuple.fst_state == kNoStateId)
523 const Fst<A>* fst = fst_array_[tuple.fst_id];
524 size_t num_arcs = fst->NumArcs(tuple.fst_state);
525 if (ComputeFinalArc(tuple, 0))
557 StateTuple tuple = state_table_->Tuple(s);
558 if (tuple.fst_state == kNoStateId)
560 const Fst<A>* fst = fst_array_[tuple.fst_id];
565 fst->NumInputEpsilons(tuple.fst_state);
569 ArcIterator<Fst<A> > aiter(*fst, tuple.fst_state);
576 if (ComputeFinalArc(tuple, 0))
594 StateTuple tuple = state_table_->Tuple(s);
595 if (tuple.fst_state == kNoStateId)
597 const Fst<A>* fst = fst_array_[tuple.fst_id];
599 ArcIterator<Fst<A> > aiter(*fst, tuple.fst_state);
605 if (ComputeFinalArc(tuple, 0))
638 StateTuple tuple = state_table_->Tuple(s);
641 if (tuple.fst_state == kNoStateId) {
647 *(fst_array_[tuple.fst_id]), tuple.fst_state);
651 if (ComputeFinalArc(tuple, &arc))
656 if (ComputeArc(tuple, aiter.Value(), &arc))
663 void Expand(StateId s, const StateTuple &tuple,
666 if (tuple.fst_state == kNoStateId) {
675 if (ComputeFinalArc(tuple, &arc))
680 if (ComputeArc(tuple, aiter.Value(), &arc))
689 bool ComputeFinalArc(const StateTuple &tuple, A* arcp,
691 const Fst<A>* fst = fst_array_[tuple.fst_id];
692 StateId fst_state = tuple.fst_state;
697 const StackPrefix& stack = stackprefix_array_[tuple.prefix_id];
720 bool ComputeArc(const StateTuple &tuple, const A &arc, A* arcp,
731 StateTuple(tuple.prefix_id, tuple.fst_id, arc.nextstate))
741 PrefixId nt_prefix = PushPrefix(stackprefix_array_[tuple.prefix_id],
742 tuple.fst_id, arc.nextstate);
760 StateTuple(tuple.prefix_id, tuple.fst_id, arc.nextstate))
791 // \brief Tuple of fst_id and destination state (entry in stack prefix)
934 // to the tuple of non-terminal Label and corresponding Fst. For example
1075 tuple_ = fst_.GetImpl()->GetStateTable()->Tuple(state_);
1213 mutable typename T::StateTuple tuple_; // Tuple corresponding to state_
1327 tuple_ = impl_->GetStateTable()->Tuple(s_);
1408 mutable typename T::StateTuple tuple_; // Tuple corresponding to state_
1432 // input argument is a vector of pair<>. These correspond to the tuple