FST  openfst-1.6.1
OpenFst Library
equivalent.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 Equivalent(const FstClass &fst1, const FstClass &fst2, float delta,
12  bool *error) {
13  if (!ArcTypesMatch(fst1, fst2, "Equivalent")) return false;
14  EquivalentInnerArgs iargs(fst1, fst2, delta, error);
15  EquivalentArgs args(iargs);
16  Apply<Operation<EquivalentArgs>>("Equivalent", fst1.ArcType(), &args);
17  return args.retval;
18 }
19 
23 
24 } // namespace script
25 } // namespace fst
void Equivalent(EquivalentArgs *args)
Definition: equivalent.h:19
const string & ArcType() const override
Definition: fst-class.h:289
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
bool ArcTypesMatch(const M &m, const N &n, const string &op_name)
Definition: script-impl.h:177