FST  openfst-1.7.3
OpenFst Library
closure.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_CLOSURE_H_
5 #define FST_SCRIPT_CLOSURE_H_
6 
7 #include <utility>
8 
9 #include <fst/closure.h>
10 #include <fst/script/fst-class.h>
11 
12 namespace fst {
13 namespace script {
14 
15 using ClosureArgs = std::pair<MutableFstClass *, const ClosureType>;
16 
17 template <class Arc>
18 void Closure(ClosureArgs *args) {
19  MutableFst<Arc> *fst = std::get<0>(*args)->GetMutableFst<Arc>();
20  Closure(fst, std::get<1>(*args));
21 }
22 
23 void Closure(MutableFstClass *ofst, ClosureType closure_type);
24 
25 } // namespace script
26 } // namespace fst
27 
28 #endif // FST_SCRIPT_CLOSURE_H_
ClosureType
Definition: rational.h:24
std::pair< MutableFstClass *, const ClosureType > ClosureArgs
Definition: closure.h:15
void Closure(ClosureArgs *args)
Definition: closure.h:18