FST  openfst-1.6.1
OpenFst Library
compose.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_COMPOSE_H_
5 #define FST_SCRIPT_COMPOSE_H_
6 
7 #include <fst/compose.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 ComposeArgs1 = args::Package<const FstClass &, const FstClass &,
16 
17 template <class Arc>
18 void Compose(ComposeArgs1 *args) {
19  const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>());
20  const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>());
21  MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>();
22  Compose(ifst1, ifst2, ofst, ComposeOptions(args->arg4));
23 }
24 
26 
27 using ComposeArgs2 = args::Package<const FstClass &, const FstClass &,
29 
30 template <class Arc>
31 void Compose(ComposeArgs2 *args) {
32  const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>());
33  const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>());
34  MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>();
35  Compose(ifst1, ifst2, ofst, args->arg4);
36 }
37 
38 void Compose(const FstClass &ifst1, const FstClass &ifst2,
39  MutableFstClass *ofst,
40  const ComposeOptions &opts = fst::script::ComposeOptions());
41 
42 void Compose(const FstClass &ifst1, const FstClass &ifst2,
43  MutableFstClass *ofst, ComposeFilter compose_filter);
44 
45 } // namespace script
46 } // namespace fst
47 
48 #endif // FST_SCRIPT_COMPOSE_H_
void Compose(ComposeArgs1 *args)
Definition: compose.h:18
fst::ComposeOptions ComposeOptions
Definition: compose.h:25
args::Package< const FstClass &, const FstClass &, MutableFstClass *, ComposeFilter > ComposeArgs1
Definition: compose.h:15
ComposeFilter
Definition: compose.h:920