FST  openfst-1.7.2
OpenFst Library
difference.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_DIFFERENCE_H_
5 #define FST_SCRIPT_DIFFERENCE_H_
6 
7 #include <tuple>
8 
9 #include <fst/difference.h>
10 #include <fst/script/compose.h>
11 #include <fst/script/fst-class.h>
12 
13 namespace fst {
14 namespace script {
15 
16 using DifferenceArgs = std::tuple<const FstClass &, const FstClass &,
18 
19 template <class Arc>
21  const Fst<Arc> &ifst1 = *(std::get<0>(*args).GetFst<Arc>());
22  const Fst<Arc> &ifst2 = *(std::get<1>(*args).GetFst<Arc>());
23  MutableFst<Arc> *ofst = std::get<2>(*args)->GetMutableFst<Arc>();
24  const auto &opts = std::get<3>(*args);
25  Difference(ifst1, ifst2, ofst, opts);
26 }
27 
28 void Difference(const FstClass &ifst1, const FstClass &ifst2,
29  MutableFstClass *ofst,
30  const ComposeOptions &opts = ComposeOptions());
31 
32 } // namespace script
33 } // namespace fst
34 
35 #endif // FST_SCRIPT_DIFFERENCE_H_
std::tuple< const FstClass &, const FstClass &, MutableFstClass *, const ComposeOptions & > DifferenceArgs
Definition: difference.h:17
void Difference(DifferenceArgs *args)
Definition: difference.h:20