Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <fst/script/fst-class.h>
00018 #include <fst/script/script-impl.h>
00019 #include <fst/script/randgen.h>
00020
00021 namespace fst {
00022 namespace script {
00023
00024 void RandGen(const FstClass &ifst, MutableFstClass *ofst, int32 seed,
00025 const RandGenOptions<RandArcSelection> &opts) {
00026 if (!ArcTypesMatch(ifst, *ofst, "RandGen")) return;
00027
00028 RandGenArgs args(ifst, ofst, seed, opts);
00029 Apply<Operation<RandGenArgs> >("RandGen", ifst.ArcType(), &args);
00030 }
00031
00032 REGISTER_FST_OPERATION(RandGen, StdArc, RandGenArgs);
00033 REGISTER_FST_OPERATION(RandGen, LogArc, RandGenArgs);
00034
00035 }
00036 }
00037