Lines Matching full:ofst
67 // 'ShortestPath' below with n=1. 'ofst' contains the shortest path in
79 MutableFst<Arc> *ofst,
85 ofst->DeleteStates();
86 ofst->SetInputSymbols(ifst.InputSymbols());
87 ofst->SetOutputSymbols(ifst.OutputSymbols());
90 if (ifst.Properties(kError, false)) ofst->SetProperties(kError, kError);
108 ofst->SetProperties(kError, kError);
115 ofst->SetProperties(kError, kError);
122 ofst->SetProperties(kError, kError);
149 ofst->SetProperties(kError, kError);
171 ofst->SetProperties(kError, kError);
191 s_p = ofst->AddState();
193 ofst->SetFinal(s_p, ifst.Final(f_parent));
196 ofst->AddArc(s_p, arc_parent[d]);
199 ofst->SetStart(s_p);
200 if (ifst.Properties(kError, false)) ofst->SetProperties(kError, kError);
201 ofst->SetProperties(
202 ShortestPathProperties(ofst->Properties(kFstProperties, false)),
253 // 'ofst' contains the REVERSE of 'n'-shortest paths in 'ifst'.
259 // ith of at most n transitions leaving the initial state of 'ofst' is
277 MutableFst<Arc> *ofst,
293 ofst->SetProperties(kError, kError);
296 ofst->DeleteStates();
297 ofst->SetInputSymbols(ifst.InputSymbols());
298 ofst->SetOutputSymbols(ifst.OutputSymbols());
299 // Each state in 'ofst' corresponds to a path with weight w from the
302 // state in 'ofst' to the corresponding pair maps states in OFST to
312 // 'r[s + 1]', 's' state in 'fst', is the number of states in 'ofst'
322 if (ifst.Properties(kError, false)) ofst->SetProperties(kError, kError);
325 ofst->SetStart(ofst->AddState());
326 StateId final = ofst->AddState();
327 ofst->SetFinal(final, Weight::One());
344 ofst->NumStates() >= state_threshold))
350 ofst->AddArc(ofst->Start(), Arc(0, 0, Weight::One(), state));
361 StateId next = ofst->AddState();
364 ofst->AddArc(next, arc);
372 StateId next = ofst->AddState();
374 ofst->AddArc(next, Arc(0, 0, finalw, state));
379 Connect(ofst);
380 if (ifst.Properties(kError, false)) ofst->SetProperties(kError, kError);
381 ofst->SetProperties(
382 ShortestPathProperties(ofst->Properties(kFstProperties, false)),
390 // 'ofst' contains the n-shortest paths in 'ifst'. 'distance' returns
399 // ith of at most n transitions leaving the initial state of 'ofst' is
413 void ShortestPath(const Fst<Arc> &ifst, MutableFst<Arc> *ofst,
422 SingleShortestPath(ifst, ofst, distance, opts);
430 ofst->SetProperties(kError, kError);
436 ofst->SetProperties(kError, kError);
441 // the distance to the final state in 'rfst', 'ofst' is built as the
456 NShortestPath(rfst, ofst, *distance, n, opts.delta,
462 NShortestPath(dfst, ofst, ddistance, n, opts.delta,
472 // 'ofst' contains the 'n'-shortest paths in 'ifst'. The queue
478 // ith of at most n transitions leaving the initial state of 'ofst' is
484 void ShortestPath(const Fst<Arc> &ifst, MutableFst<Arc> *ofst,
496 ShortestPath(ifst, ofst, &distance, opts);