FST  openfst-1.7.1
OpenFst Library
randequivalent.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 RandEquivalent(const FstClass &fst1, const FstClass &fst2, int32 npath,
12  float delta, time_t seed,
14  if (!internal::ArcTypesMatch(fst1, fst2, "RandEquivalent")) return false;
15  RandEquivalentInnerArgs iargs(fst1, fst2, npath, delta, seed, opts);
16  RandEquivalentArgs args(iargs);
17  Apply<Operation<RandEquivalentArgs>>("RandEquivalent", fst1.ArcType(), &args);
18  return args.retval;
19 }
20 
24 
25 } // namespace script
26 } // 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
std::tuple< const FstClass &, const FstClass &, int32, float, time_t, const RandGenOptions< RandArcSelection > & > RandEquivalentInnerArgs
int32_t int32
Definition: types.h:26
void RandEquivalent(RandEquivalentArgs *args)