18 #ifndef FST_SCRIPT_RANDGEN_H_ 19 #define FST_SCRIPT_RANDGEN_H_ 35 std::tuple<
const FstClass &, MutableFstClass *,
40 const Fst<Arc> &ifst = *std::get<0>(*args).GetFst<Arc>();
42 const auto &opts = std::get<2>(*args);
43 const uint64_t seed = std::get<3>(*args);
44 switch (opts.selector) {
48 selector, opts.max_length, opts.npath, opts.weighted,
49 opts.remove_total_weight);
56 selector, opts.max_length, opts.npath, opts.weighted,
57 opts.remove_total_weight);
64 selector, opts.max_length, opts.npath, opts.weighted,
65 opts.remove_total_weight);
72 void RandGen(
const FstClass &ifst, MutableFstClass *ofst,
75 uint64_t seed = std::random_device()());
80 #endif // FST_SCRIPT_RANDGEN_H_
void RandGen(FstRandGenArgs *args)
std::tuple< const FstClass &, MutableFstClass *, const RandGenOptions< RandArcSelection > &, uint64_t > FstRandGenArgs