FST  openfst-1.7.1
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 
4 #include <fst/script/fst-class.h>
7 
8 namespace fst {
9 namespace script {
10 
11 bool Isomorphic(const FstClass &fst1, const FstClass &fst2, float delta) {
12  if (!internal::ArcTypesMatch(fst1, fst2, "Isomorphic")) return false;
13  IsomorphicInnerArgs iargs(fst1, fst2, delta);
14  IsomorphicArgs args(iargs);
15  Apply<Operation<IsomorphicArgs>>("Isomorphic", fst1.ArcType(), &args);
16  return args.retval;
17 }
18 
22 
23 } // namespace script
24 } // namespace fst
void Isomorphic(IsomorphicArgs *args)
Definition: isomorphic.h:22
const string & ArcType() const final
Definition: fst-class.h:290
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
bool ArcTypesMatch(const M &m, const N &n, const string &op_name)
Definition: script-impl.h:176
std::tuple< const FstClass &, const FstClass &, float > IsomorphicInnerArgs
Definition: isomorphic.h:17