1 #ifndef VCSN_ALGOS_CONSTANT_TERM_HH
2 # define VCSN_ALGOS_CONSTANT_TERM_HH
23 template <
typename RatExpSet>
25 :
public RatExpSet::const_visitor
30 using ratexp_t =
typename ratexpset_t::value_t;
34 using super_t =
typename ratexpset_t::const_visitor;
36 constexpr
static const char*
me() {
return "constant_term"; }
39 :
ws_(*rs.weightset())
46 return std::move(
res_);
53 return std::move(
res_);
76 res_ = std::move(res);
84 res_ = std::move(res);
96 res_ = std::move(res);
105 res_ = std::move(res);
115 v.sub()->accept(*
this);
121 v.sub()->accept(*
this);
141 template <
typename RatExpSet>
156 template <
typename RatExpSet>
160 const auto& e = exp->as<RatExpSet>();
162 constant_term<RatExpSet>(e.ratexpset(),
172 #endif // !VCSN_ALGOS_CONSTANT_TERM_HH
typename ratexpset_t::const_visitor super_t
weight_t_of< ratexpset_t > weight_t
An inner node with multiple children.
#define VCSN_RAT_UNSUPPORTED(Type)
REGISTER_DECLARE(accessible,(const automaton &) -> automaton)
VCSN_RAT_VISIT(complement, v)
weight constant_term(const ratexp &exp)
std::shared_ptr< const detail::weight_base > weight
std::shared_ptr< detail::ratexp_base > ratexp
weight_t constant_term(const ratexp_t &v)
Easy recursion.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
VCSN_RAT_VISIT(rweight, v)
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
VCSN_RAT_VISIT(shuffle, v)
context_t_of< ratexpset_t > context_t
weight make_weight(const WeightSet &ws, const typename WeightSet::value_t &w)
An inner node implementing a weight.
weight_t_of< RatExpSet > constant_term(const RatExpSet &rs, const typename RatExpSet::value_t &e)
typename detail::weight_t_of_impl< base_t< ValueSet >>::type weight_t_of
VCSN_RAT_VISIT(lweight, v)
typename ratexpset_t::value_t ratexp_t
static constexpr const char * me()
weight_t operator()(const ratexp_t &v)
weightset_t_of< ratexpset_t > weightset_t
constant_term_visitor(const ratexpset_t &rs)