FST  openfst-1.7.3
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 
5 
6 #include <fst/script/fst-class.h>
8 
9 namespace fst {
10 namespace script {
11 
12 void ShortestDistance(const FstClass &fst, std::vector<WeightClass> *distance,
13  const ShortestDistanceOptions &opts) {
14  ShortestDistanceArgs1 args(fst, distance, opts);
15  Apply<Operation<ShortestDistanceArgs1>>("ShortestDistance", fst.ArcType(),
16  &args);
17 }
18 
19 void ShortestDistance(const FstClass &ifst, std::vector<WeightClass> *distance,
20  bool reverse, double delta) {
21  ShortestDistanceArgs2 args(ifst, distance, reverse, delta);
22  Apply<Operation<ShortestDistanceArgs2>>("ShortestDistance", ifst.ArcType(),
23  &args);
24 }
25 
29 
33 
34 } // namespace script
35 } // namespace fst
const std::string & ArcType() const final
Definition: fst-class.h:298
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