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