15 template <Automaton Aut>
22 using path_t = std::vector<transition_t>;
30 res =
ws_.mul(res, aut->weight_of(tr));
48 template <
typename... Args>
51 path_.emplace_back(std::forward<Args>(args)...);
62 template <
typename PolynomialSet>
65 ->
typename PolynomialSet::monomial_t
67 const auto& pls = *ps.labelset();
68 const auto& pws = *ps.weightset();
69 const auto& ls = *
aut_->labelset();
74 w = pws.mul(w,
aut_->weight_of(t));
75 auto nl =
aut_->label_of(t);
76 if (!ls.is_special(nl))
typename detail::weightset_t_of_impl< base_t< ValueSet > >::type weightset_t_of
typename detail::transition_t_of_impl< base_t< ValueSet > >::type transition_t_of
typename detail::state_t_of_impl< base_t< ValueSet > >::type state_t_of
weight_t_of< Aut > weight_t
constant< type_t::one, Context > one
void emplace_back(weight_t weight, Args &&... args)
auto make_monomial(const PolynomialSet &ps) const -> typename PolynomialSet::monomial_t
Construct a monomial from the path.
transition_t_of< automaton_t > transition_t
void push_back(transition_t tr, weight_t weight)
weight_t path_sum(const automaton_t &aut, const std::vector< transition_t > &elts)
Explicit path representation.
path(const automaton_t &aut, const std::vector< transition_t > &elts={})
const weightset_t_of< automaton_t > & ws_
bool operator<(const path &other) const
std::vector< transition_t > path_t
typename detail::weight_t_of_impl< base_t< ValueSet > >::type weight_t_of
value_impl< detail::weight_tag > weight
const path_t & get_path() const
state_t_of< automaton_t > state_t