Lines Matching refs:opts
93 // the weight of the shortest path Times() 'opts.weight_threshold'.
94 // When 'opts.state_threshold != kNoStateId', the resulting transducer
95 // will restricted further to have at most 'opts.state_threshold'
101 const PruneOptions<Arc, ArcFilter> &opts) {
117 if (!opts.distance) {
119 ShortestDistance(*fst, &tmp, true, opts.delta);
121 const vector<Weight> *fdistance = opts.distance ? opts.distance : &tmp;
123 if ((opts.state_threshold == 0) ||
136 Weight limit = Times((*fdistance)[fst->Start()], opts.weight_threshold);
157 if (!opts.filter(arc)) continue;
170 if ((opts.state_threshold != kNoStateId) &&
171 (num_visited >= opts.state_threshold))
193 // 'opts.state_threshold' states. Weights need to be commutative and
201 PruneOptions<Arc, AnyArcFilter<Arc> > opts(weight_threshold, state_threshold,
203 Prune(fst, opts);
211 // Times() 'opts.weight_threshold'. When 'opts.state_threshold !=
213 // 'opts.state_threshold' states. Weights need to be commutative and
219 const PruneOptions<Arc, ArcFilter> &opts) {
237 if (less(opts.weight_threshold, Weight::One()) ||
238 (opts.state_threshold == 0))
242 if (!opts.distance)
243 ShortestDistance(ifst, &tmp, true, opts.delta);
244 const vector<Weight> *fdistance = opts.distance ? opts.distance : &tmp;
258 opts.weight_threshold);
283 if (!opts.filter(arc)) continue;
289 if ((opts.state_threshold != kNoStateId) &&
290 (ofst->NumStates() >= opts.state_threshold))
323 // to have at most 'opts.state_threshold' states. Weights need to be
332 PruneOptions<Arc, AnyArcFilter<Arc> > opts(weight_threshold, state_threshold,
334 Prune(ifst, ofst, opts);