18 #ifndef FST_SCRIPT_RMEPSILON_H_ 19 #define FST_SCRIPT_RMEPSILON_H_ 46 weight_threshold(weight_threshold),
47 state_threshold(state_threshold) {}
54 template <
class Arc,
class Queue>
56 std::vector<typename Arc::Weight> *distance,
58 using Weight =
typename Arc::Weight;
67 using StateId =
typename Arc::StateId;
68 using Weight =
typename Arc::Weight;
69 std::vector<Weight> distance;
91 FSTERROR() <<
"RmEpsilon: Bad queue type SHORTEST_FIRST_QUEUE for" 92 <<
" non-idempotent Weight " << Weight::Type();
122 const auto &opts = std::get<1>(*args);
131 #endif // FST_SCRIPT_RMEPSILON_H_
const QueueType queue_type
const WeightClass & weight_threshold
constexpr uint64_t kError
std::bool_constant<(W::Properties()&kIdempotent)!=0 > IsIdempotent
RmEpsilonOptions(QueueType queue_type, bool connect, const WeightClass &weight_threshold, int64_t state_threshold=kNoStateId, float delta=kDelta)
virtual void SetProperties(uint64_t props, uint64_t mask)=0
const W * GetWeight() const
const int64_t state_threshold
std::pair< MutableFstClass *, const RmEpsilonOptions & > FstRmEpsilonArgs
void RmEpsilon(FstRmEpsilonArgs *args)
void RmEpsilon(MutableFst< Arc > *fst, std::vector< typename Arc::Weight > *distance, const RmEpsilonOptions &opts, Queue *queue)