17 #ifndef AWALI_ALGOS_CONSTANT_TERM_HH
18 # define AWALI_ALGOS_CONSTANT_TERM_HH
26 namespace awali {
namespace sttc {
37 template <
typename RatExpSet>
39 :
public RatExpSet::const_visitor
44 using ratexp_t =
typename ratexpset_t::ratexp_t;
50 constexpr
static const char*
me() {
return "constant_term"; }
60 return std::move(res_);
67 return std::move(res_);
90 res_ = std::move(res);
98 res_ = std::move(res);
110 res_ = std::move(res);
119 res_ = std::move(res);
153 template <
typename RatExpSet>
154 weight_t_of<RatExpSet>
The semiring of complex numbers.
Definition: c.hh:44
Definition: ratexp.hh:280
Definition: constant_term.hh:40
AWALI_RAT_VISIT(prod, v)
Definition: constant_term.hh:93
AWALI_RAT_VISIT(sum, v)
Definition: constant_term.hh:85
weight_t_of< ratexpset_t > weight_t
Definition: constant_term.hh:45
AWALI_RAT_VISIT(complement, v)
Definition: constant_term.hh:137
weight_t constant_term(const ratexp_t &v)
Easy recursion.
Definition: constant_term.hh:64
AWALI_RAT_VISIT(atom,)
Definition: constant_term.hh:80
AWALI_RAT_VISIT(shuffle, v)
Definition: constant_term.hh:113
AWALI_RAT_VISIT(lweight, v)
Definition: constant_term.hh:127
AWALI_RAT_VISIT(zero,)
Definition: constant_term.hh:70
typename ratexpset_t::ratexp_t ratexp_t
Definition: constant_term.hh:44
weightset_t_of< ratexpset_t > weightset_t
Definition: constant_term.hh:46
RatExpSet ratexpset_t
Definition: constant_term.hh:42
AWALI_RAT_VISIT(one,)
Definition: constant_term.hh:75
AWALI_RAT_VISIT(star, v)
Definition: constant_term.hh:122
context_t_of< ratexpset_t > context_t
Definition: constant_term.hh:43
constant_term_visitor(const ratexpset_t &rs)
Definition: constant_term.hh:52
constexpr static const char * me()
Definition: constant_term.hh:50
typename ratexpset_t::const_visitor super_type
Definition: constant_term.hh:48
weight_t operator()(const ratexp_t &v)
Definition: constant_term.hh:57
AWALI_RAT_VISIT(rweight, v)
Definition: constant_term.hh:132
Definition: ratexp.hh:262
Definition: ratexp.hh:176
An inner node with multiple children.
Definition: ratexp.hh:115
An inner node implementing a weight.
Definition: ratexp.hh:208
weightset_description weightset(const std::string &k)
typename internal::weight_t_of_impl< internal::base_t< ValueSet > >::type weight_t_of
Helper to retrieve the type of the weights of a value set.
Definition: traits.hh:81
typename internal::context_t_of_impl< internal::base_t< ValueSet > >::type context_t_of
Helper to retrieve the type of the context of a value set.
Definition: traits.hh:66
weight_t_of< RatExpSet > constant_term(const RatExpSet &rs, const typename RatExpSet::ratexp_t &e)
Definition: constant_term.hh:155
typename internal::weightset_t_of_impl< internal::base_t< ValueSet > >::type weightset_t_of
Helper to retrieve the type of the weightset of a value set.
Definition: traits.hh:86
Main namespace of Awali.
Definition: ato.hh:22
#define AWALI_RAT_UNSUPPORTED(Type)
Definition: visitor.hh:73