18 #ifndef FST_SCRIPT_PRUNE_H_ 19 #define FST_SCRIPT_PRUNE_H_ 32 using FstPruneArgs1 = std::tuple<
const FstClass &, MutableFstClass *,
37 using Weight =
typename Arc::Weight;
38 const Fst<Arc> &ifst = *std::get<0>(*args).GetFst<Arc>();
41 const auto weight_threshold = *std::get<2>(*args).GetWeight<Weight>();
42 Prune(ifst, ofst, weight_threshold, std::get<3>(*args), std::get<4>(*args));
44 FSTERROR() <<
"Prune: Weight must have path property: " << Weight::Type();
50 std::tuple<MutableFstClass *, const WeightClass &, int64_t, float>;
54 using Weight =
typename Arc::Weight;
57 const auto weight_threshold = *std::get<1>(*args).GetWeight<Weight>();
58 Prune(fst, weight_threshold, std::get<2>(*args), std::get<3>(*args));
60 FSTERROR() <<
"Prune: Weight must have path property: " << Weight::Type();
65 void Prune(
const FstClass &ifst, MutableFstClass *ofst,
75 #endif // FST_SCRIPT_PRUNE_H_
std::tuple< MutableFstClass *, const WeightClass &, int64_t, float > FstPruneArgs2
constexpr uint64_t kError
virtual void SetProperties(uint64_t props, uint64_t mask)=0
std::tuple< const FstClass &, MutableFstClass *, const WeightClass &, int64_t, float > FstPruneArgs1
void Prune(FstPruneArgs1 *args)
std::bool_constant<(W::Properties()&kPath)!=0 > IsPath