FST  openfst-1.7.3
OpenFst Library
isomorphic.cc
Go to the documentation of this file.
1 // See www.openfst.org for extensive documentation on this weighted
2 // finite-state transducer library.
3 
5 
6 #include <fst/script/fst-class.h>
8 
9 namespace fst {
10 namespace script {
11 
12 bool Isomorphic(const FstClass &fst1, const FstClass &fst2, float delta) {
13  if (!internal::ArcTypesMatch(fst1, fst2, "Isomorphic")) return false;
14  IsomorphicInnerArgs iargs(fst1, fst2, delta);
15  IsomorphicArgs args(iargs);
16  Apply<Operation<IsomorphicArgs>>("Isomorphic", fst1.ArcType(), &args);
17  return args.retval;
18 }
19 
23 
24 } // namespace script
25 } // namespace fst
const std::string & ArcType() const final
Definition: fst-class.h:298
void Isomorphic(IsomorphicArgs *args)
Definition: isomorphic.h:22
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
bool ArcTypesMatch(const M &m, const N &n, const std::string &op_name)
Definition: script-impl.h:177
std::tuple< const FstClass &, const FstClass &, float > IsomorphicInnerArgs
Definition: isomorphic.h:17