18 #ifndef FST_SCRIPT_PRUNE_H_ 19 #define FST_SCRIPT_PRUNE_H_ 38 using FstPruneArgs1 = std::tuple<
const FstClass &, MutableFstClass *,
43 using Weight =
typename Arc::Weight;
44 const Fst<Arc> &ifst = *std::get<0>(*args).GetFst<Arc>();
47 const auto weight_threshold = *std::get<2>(*args).GetWeight<Weight>();
48 Prune(ifst, ofst, weight_threshold, std::get<3>(*args), std::get<4>(*args));
50 FSTERROR() <<
"Prune: Weight must have path property: " << Weight::Type();
56 std::tuple<MutableFstClass *, const WeightClass &, int64_t, float>;
60 using Weight =
typename Arc::Weight;
63 const auto weight_threshold = *std::get<1>(*args).GetWeight<Weight>();
64 Prune(fst, weight_threshold, std::get<2>(*args), std::get<3>(*args));
66 FSTERROR() <<
"Prune: Weight must have path property: " << Weight::Type();
71 void Prune(
const FstClass &ifst, MutableFstClass *ofst,
81 #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