Home | History | Annotate | Download | only in lib

Lines Matching refs:arcs

17 // Functions to sum arcs (sum weights) in an fst.
53 // Combines identically labeled arcs, summing weights. For each state
54 // we combine arcs with the same input and output label, summing their
60 vector<A> arcs;
65 // Sums arcs into arcs array.
66 arcs.clear();
67 arcs.reserve(fst->NumArcs(s));
70 arcs.push_back(aiter.Value());
72 // At each state, first sorts the exiting arcs by input label, output label
73 // and destination state and then combines arcs identical in these
76 sort(arcs.begin(), arcs.end(), comp);
78 // Deletes current arcs and copy in sumed arcs.
80 A current_arc = arcs[0];
82 for (size_t i = 1; i < arcs.size(); ++i) {
83 if (equal(current_arc, arcs[i])) {
84 current_arc.weight = Plus(current_arc.weight, arcs[i].weight);
87 current_arc = arcs[i];