FST  openfst-1.7.2
OpenFst Library
shortest-distance.cc
Go to the documentation of this file.
1 // See www.openfst.org for extensive documentation on this weighted
2 // finite-state transducer library.
3 
4 #include <fst/script/fst-class.h>
7 
8 namespace fst {
9 namespace script {
10 
11 void ShortestDistance(const FstClass &fst, std::vector<WeightClass> *distance,
12  const ShortestDistanceOptions &opts) {
13  ShortestDistanceArgs1 args(fst, distance, opts);
14  Apply<Operation<ShortestDistanceArgs1>>("ShortestDistance", fst.ArcType(),
15  &args);
16 }
17 
18 void ShortestDistance(const FstClass &ifst, std::vector<WeightClass> *distance,
19  bool reverse, double delta) {
20  ShortestDistanceArgs2 args(ifst, distance, reverse, delta);
21  Apply<Operation<ShortestDistanceArgs2>>("ShortestDistance", ifst.ArcType(),
22  &args);
23 }
24 
28 
32 
33 } // namespace script
34 } // namespace fst
const string & ArcType() const final
Definition: fst-class.h:290
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
void ShortestDistance(ShortestDistanceArgs1 *args)
std::tuple< const FstClass &, std::vector< WeightClass > *, bool, double > ShortestDistanceArgs2
std::tuple< const FstClass &, std::vector< WeightClass > *, const ShortestDistanceOptions & > ShortestDistanceArgs1