17 #ifndef AWALI_ALGOS_EXP_SUPPORT_HH 
   18 # define AWALI_ALGOS_EXP_SUPPORT_HH 
   25 namespace awali { 
namespace sttc {
 
   31     template <
typename RatExpSet>
 
   33       : 
public RatExpSet::const_visitor
 
   42       using ratexp_t = 
typename in_ratexpset_t::ratexp_t;
 
   47       constexpr 
static const char* 
me() { 
return "exp support"; }
 
   62   res_ = out_ratexpset_.zero();
 
   67   res_ = out_ratexpset_.one();
 
   72   res_ = out_ratexpset_.atom(e.value());
 
   77   auto r = out_ratexpset_.zero(); 
 
   81       r = out_ratexpset_.add(
r, res_);
 
   94   auto r = out_ratexpset_.one();  
 
   98       r = out_ratexpset_.
mul(
r, res_);
 
  105         e.sub()->accept(*
this);
 
  106   res_ = out_ratexpset_.star(res_);
 
  111         e.sub()->accept(*
this);
 
  112   res_ = out_ratexpset_.maybe(res_);
 
  117         e.sub()->accept(*
this);
 
  118   res_ = out_ratexpset_.plus(res_);
 
  123         e.sub()->accept(*
this);
 
  128         e.sub()->accept(*
this);
 
  132   return out_ratexpset_;
 
  138       out_ratexpset_t out_ratexpset_{out_context_, in_ratexpset_.identities()};
 
  139       typename out_ratexpset_t::ratexp_t res_;
 
  153     template <
typename RatExpSet>
 
  162                               template <
typename RatExpSet>
 
  174     return copyer.get_ratexpset();
 
The Boolean semring.
Definition: b.hh:38
 
The semiring of complex numbers.
Definition: c.hh:44
 
const labelset_ptr & labelset() const
Definition: context.hh:152
 
The semiring of floating Numbers.
Definition: r.hh:35
 
Definition: ratexp.hh:280
 
Definition: ratexp.hh:262
 
Definition: exp_support.hh:34
 
expsupport_visitor(const in_ratexpset_t &ratexpset)
Definition: exp_support.hh:49
 
AWALI_RAT_VISIT(star, e)
Definition: exp_support.hh:103
 
context< labelset_t, sttc::b > out_context_t
Definition: exp_support.hh:40
 
AWALI_RAT_VISIT(rweight, e)
Definition: exp_support.hh:126
 
typename in_ratexpset_t::ratexp_t ratexp_t
Definition: exp_support.hh:42
 
RatExpSet in_ratexpset_t
Definition: exp_support.hh:36
 
AWALI_RAT_VISIT(plus, e)
Definition: exp_support.hh:115
 
labelset_t_of< in_context_t > labelset_t
Definition: exp_support.hh:38
 
AWALI_RAT_VISIT(lweight, e)
Definition: exp_support.hh:121
 
typename out_ratexpset_t::ratexp_t out_ratexp_t
Definition: exp_support.hh:43
 
out_ratexpset_t get_ratexpset()
Definition: exp_support.hh:131
 
AWALI_RAT_VISIT(one,)
Definition: exp_support.hh:65
 
constexpr static const char * me()
Definition: exp_support.hh:47
 
AWALI_RAT_VISIT(atom, e)
Definition: exp_support.hh:70
 
AWALI_RAT_VISIT(zero,)
Definition: exp_support.hh:60
 
AWALI_RAT_VISIT(maybe, e)
Definition: exp_support.hh:109
 
AWALI_RAT_VISIT(sum, e)
Definition: exp_support.hh:75
 
ratexpset_of< out_context_t > out_ratexpset_t
Definition: exp_support.hh:41
 
typename RatExpSet::const_visitor super_type
Definition: exp_support.hh:45
 
context_t_of< in_ratexpset_t > in_context_t
Definition: exp_support.hh:37
 
out_ratexp_t operator()(const ratexp_t &v)
Definition: exp_support.hh:54
 
Definition: ratexp.hh:176
 
An inner node with multiple children.
Definition: ratexp.hh:115
 
An inner node implementing a weight.
Definition: ratexp.hh:208
 
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
 
typename internal::labelset_t_of_impl< internal::base_t< ValueSet > >::type labelset_t_of
Helper to retrieve the type of the labelset of a value set.
Definition: traits.hh:76
 
auto ratexp_support(const typename RatExpSet::ratexp_t &exp, const RatExpSet &ratexpset) -> typename rat::expsupport_visitor< RatExpSet >::out_ratexp_t
support of a rational expression
Definition: exp_support.hh:155
 
auto support_ratexpset(const RatExpSet &ratexpset) -> typename rat::expsupport_visitor< RatExpSet >::out_ratexpset_t
Compute a derived ratexpset.
Definition: exp_support.hh:170
 
Main namespace of Awali.
Definition: ato.hh:22
 
Provide a variadic mul on top of a binary mul(), and one().
Definition: weightset.hh:38
 
value_t mul(const Ts &... ts) const
Definition: weightset.hh:49
 
#define AWALI_RAT_UNSUPPORTED(Type)
Definition: visitor.hh:75