FST  openfst-1.6.1
OpenFst Library
intersect.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_INTERSECT_H_
5 #define FST_SCRIPT_INTERSECT_H_
6 
7 #include <fst/intersect.h>
8 #include <fst/script/arg-packs.h>
9 #include <fst/script/compose.h> // for ComposeOptions, ComposeFilter
10 #include <fst/script/fst-class.h>
11 
12 namespace fst {
13 namespace script {
14 
15 using IntersectArgs1 = args::Package<const FstClass &, const FstClass &,
17 
18 template <class Arc>
20  const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>());
21  const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>());
22  MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>();
23  Intersect(ifst1, ifst2, ofst, ComposeOptions(args->arg4));
24 }
25 
26 using IntersectArgs2 = args::Package<const FstClass &, const FstClass &,
28 
29 template <class Arc>
31  const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>());
32  const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>());
33  MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>();
34  Intersect(ifst1, ifst2, ofst, ComposeOptions(args->arg4));
35 }
36 
37 void Intersect(const FstClass &ifst1, const FstClass &ifst2,
38  MutableFstClass *ofst, ComposeFilter compose_filter);
39 
40 void Intersect(const FstClass &ifst, const FstClass &ifst2,
41  MutableFstClass *ofst,
42  const ComposeOptions &opts = fst::script::ComposeOptions());
43 
44 } // namespace script
45 } // namespace fst
46 
47 #endif // FST_SCRIPT_INTERSECT_H_
void Intersect(IntersectArgs1 *args)
Definition: intersect.h:19
args::Package< const FstClass &, const FstClass &, MutableFstClass *, ComposeFilter > IntersectArgs1
Definition: intersect.h:16
fst::ComposeOptions ComposeOptions
Definition: compose.h:25
ComposeFilter
Definition: compose.h:920