FST  openfst-1.7.2
OpenFst Library
reverse.h
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 #ifndef FST_SCRIPT_REVERSE_H_
5 #define FST_SCRIPT_REVERSE_H_
6 
7 #include <tuple>
8 
9 #include <fst/reverse.h>
10 #include <fst/script/fst-class.h>
11 
12 namespace fst {
13 namespace script {
14 
15 using ReverseArgs = std::tuple<const FstClass &, MutableFstClass *, bool>;
16 
17 template <class Arc>
18 void Reverse(ReverseArgs *args) {
19  const Fst<Arc> &ifst = *(std::get<0>(*args).GetFst<Arc>());
20  MutableFst<Arc> *ofst = std::get<1>(*args)->GetMutableFst<Arc>();
21  Reverse(ifst, ofst, std::get<2>(*args));
22 }
23 
24 void Reverse(const FstClass &ifst, MutableFstClass *ofst,
25  bool require_superinitial = true);
26 
27 } // namespace script
28 } // namespace fst
29 
30 #endif // FST_SCRIPT_REVERSE_H_
void Reverse(ReverseArgs *args)
Definition: reverse.h:18
std::tuple< const FstClass &, MutableFstClass *, bool > ReverseArgs
Definition: reverse.h:15