Vcsn
2.4
Be Rational
|
A functor to compute the constant term of an expression. More...
#include <constant-term.hh>
Classes | |
struct | visit_tuple |
struct | visit_tuple< false, Dummy > |
Public Types | |
using | expressionset_t = ExpSet |
using | super_t = typename expressionset_t::const_visitor |
using | self_t = constant_term_visitor |
using | context_t = context_t_of< expressionset_t > |
using | expression_t = typename expressionset_t::value_t |
using | weight_t = weight_t_of< expressionset_t > |
using | weightset_t = weightset_t_of< expressionset_t > |
Public Member Functions | |
constant_term_visitor (const expressionset_t &rs) | |
weight_t | operator() (const expression_t &v) |
Static Public Member Functions | |
static constexpr const char * | me () |
Name of this algorithm, for error messages. More... | |
Private Types | |
using | tuple_t = typename super_t::tuple_t |
Private Member Functions | |
weight_t | constant_term (const expression_t &v) |
Easy recursion. More... | |
VCSN_RAT_VISIT (zero,) | |
VCSN_RAT_VISIT (one,) | |
VCSN_RAT_VISIT (atom,) | |
VCSN_RAT_VISIT (add, v) | |
template<typename Node > | |
void | visit_product (const Node &v) |
Visit a variadic node whose constant-term is the product of the constant-terms of its children. More... | |
VCSN_RAT_VISIT (conjunction, v) | |
VCSN_RAT_VISIT (infiltrate, v) | |
VCSN_RAT_VISIT (mul, v) | |
VCSN_RAT_VISIT (shuffle, v) | |
VCSN_RAT_UNSUPPORTED (ldivide) | |
y`, yet both operands have a null constant-term. More... | |
VCSN_RAT_UNSUPPORTED (compose) | |
Cannot compute the constant-term easily here: c(<x>\\e|x @ <y>x|\\e) = xy , yet both operands have a null constant-term. More... | |
VCSN_RAT_VISIT (transposition, v) | |
VCSN_RAT_VISIT (star, v) | |
VCSN_RAT_VISIT (lweight, v) | |
VCSN_RAT_VISIT (rweight, v) | |
VCSN_RAT_VISIT (complement, v) | |
void | visit (const tuple_t &v, std::true_type) override |
Private Attributes | |
expressionset_t | rs_ |
weightset_t | ws_ |
weight_t | res_ |
A functor to compute the constant term of an expression.
ExpSet | the expressionset type. |
Definition at line 28 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::context_t = context_t_of<expressionset_t> |
Definition at line 36 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::expression_t = typename expressionset_t::value_t |
Definition at line 37 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::expressionset_t = ExpSet |
Definition at line 32 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::self_t = constant_term_visitor |
Definition at line 34 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::super_t = typename expressionset_t::const_visitor |
Definition at line 33 of file constant-term.hh.
|
private |
Definition at line 151 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::weight_t = weight_t_of<expressionset_t> |
Definition at line 38 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::weightset_t = weightset_t_of<expressionset_t> |
Definition at line 39 of file constant-term.hh.
|
inline |
Definition at line 44 of file constant-term.hh.
|
inlineprivate |
Easy recursion.
Definition at line 64 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::res_.
Referenced by vcsn::rat::constant_term_visitor< ExpSet >::operator()(), vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlinestatic |
Name of this algorithm, for error messages.
Definition at line 42 of file constant-term.hh.
|
inline |
Definition at line 49 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::rs_, and vcsn::rat::to_string().
|
private |
y`, yet both operands have a null constant-term.
|
private |
Cannot compute the constant-term easily here: c(<x>\\e|x @ <y>x|\\e) = xy
, yet both operands have a null constant-term.
|
inlineprivate |
Definition at line 70 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::res_, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 75 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::res_, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 80 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::res_, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 85 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::res, vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 104 of file constant-term.hh.
References vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlineprivate |
Definition at line 105 of file constant-term.hh.
References vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlineprivate |
Definition at line 106 of file constant-term.hh.
References vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlineprivate |
Definition at line 107 of file constant-term.hh.
References vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlineprivate |
Definition at line 119 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 124 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 129 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 134 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 139 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineoverrideprivate |
Definition at line 189 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::res_, and vcsn::v.
|
inlineprivate |
Visit a variadic node whose constant-term is the product of the constant-terms of its children.
Definition at line 96 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::res, vcsn::rat::constant_term_visitor< ExpSet >::res_, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
Referenced by vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 197 of file constant-term.hh.
Referenced by vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT(), vcsn::rat::constant_term_visitor< ExpSet >::visit(), and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
private |
Definition at line 195 of file constant-term.hh.
Referenced by vcsn::rat::constant_term_visitor< ExpSet >::operator()(), and vcsn::rat::constant_term_visitor< ExpSet >::visit_tuple< bool, Dummy >::work_().
|
private |