FST  openfst-1.7.2
OpenFst Library
equal.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>
5 #include <fst/script/equal.h>
7 
8 namespace fst {
9 namespace script {
10 
11 bool Equal(const FstClass &fst1, const FstClass &fst2, float delta) {
12  if (!internal::ArcTypesMatch(fst1, fst2, "Equal")) return false;
13  EqualInnerArgs iargs(fst1, fst2, delta);
14  EqualArgs args(iargs);
15  Apply<Operation<EqualArgs>>("Equal", fst1.ArcType(), &args);
16  return args.retval;
17 }
18 
22 
23 } // namespace script
24 } // namespace fst
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
void Equal(EqualArgs *args)
Definition: equal.h:21
std::tuple< const FstClass &, const FstClass &, float > EqualInnerArgs
Definition: equal.h:16