18 #ifndef FST_SCRIPT_RANDGEN_H_ 19 #define FST_SCRIPT_RANDGEN_H_ 33 std::tuple<
const FstClass &, MutableFstClass *,
38 const Fst<Arc> &ifst = *std::get<0>(*args).GetFst<Arc>();
40 const auto &opts = std::get<2>(*args);
41 const uint64_t seed = std::get<3>(*args);
42 switch (opts.selector) {
46 selector, opts.max_length, opts.npath, opts.weighted,
47 opts.remove_total_weight);
54 selector, opts.max_length, opts.npath, opts.weighted,
55 opts.remove_total_weight);
62 selector, opts.max_length, opts.npath, opts.weighted,
63 opts.remove_total_weight);
70 void RandGen(
const FstClass &ifst, MutableFstClass *ofst,
73 uint64_t seed = std::random_device()());
78 #endif // FST_SCRIPT_RANDGEN_H_
void RandGen(FstRandGenArgs *args)
std::tuple< const FstClass &, MutableFstClass *, const RandGenOptions< RandArcSelection > &, uint64_t > FstRandGenArgs