FST  openfst-1.6.1
OpenFst Library
minimize.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_MINIMIZE_H_
5 #define FST_SCRIPT_MINIMIZE_H_
6 
7 #include <fst/minimize.h>
8 #include <fst/script/arg-packs.h>
9 #include <fst/script/fst-class.h>
10 
11 namespace fst {
12 namespace script {
13 
14 using MinimizeArgs =
16 
17 template <class Arc>
18 void Minimize(MinimizeArgs *args) {
19  MutableFst<Arc> *ofst1 = args->arg1->GetMutableFst<Arc>();
20  MutableFst<Arc> *ofst2 = args->arg2 ?
21  args->arg2->GetMutableFst<Arc>() : nullptr;
22  Minimize(ofst1, ofst2, args->arg3, args->arg4);
23 }
24 
25 void Minimize(MutableFstClass *ofst1, MutableFstClass *ofst2 = nullptr,
26  float delta = kDelta, bool allow_nondet = false);
27 
28 } // namespace script
29 } // namespace fst
30 
31 #endif // FST_SCRIPT_MINIMIZE_H_
void Minimize(MinimizeArgs *args)
Definition: minimize.h:18
args::Package< MutableFstClass *, MutableFstClass *, float, bool > MinimizeArgs
Definition: minimize.h:15
constexpr float kDelta
Definition: weight.h:96