Vcsn
2.2
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 weightset_t &ws) | |
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 (sum, 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 (infiltration, v) | |
VCSN_RAT_VISIT (prod, v) | |
VCSN_RAT_VISIT (shuffle, v) | |
VCSN_RAT_UNSUPPORTED (ldiv) | |
y, 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 | |
weightset_t | ws_ |
weight_t | res_ |
A functor to compute the constant term of an expression.
ExpSet | the expressionset type. |
Definition at line 23 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::context_t = context_t_of<expressionset_t> |
Definition at line 31 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::expression_t = typename expressionset_t::value_t |
Definition at line 32 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::expressionset_t = ExpSet |
Definition at line 27 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::self_t = constant_term_visitor |
Definition at line 29 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::super_t = typename expressionset_t::const_visitor |
Definition at line 28 of file constant-term.hh.
|
private |
Definition at line 137 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::weight_t = weight_t_of<expressionset_t> |
Definition at line 33 of file constant-term.hh.
using vcsn::rat::constant_term_visitor< ExpSet >::weightset_t = weightset_t_of<expressionset_t> |
Definition at line 34 of file constant-term.hh.
|
inline |
Definition at line 39 of file constant-term.hh.
|
inline |
Definition at line 43 of file constant-term.hh.
|
inlineprivate |
Easy recursion.
Definition at line 56 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::res_.
Referenced by vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT(), vcsn::rat::constant_term_visitor< ExpSet >::visit_product(), and vcsn::rat::constant_term_visitor< ExpSet >::visit_tuple< bool, Dummy >::work_().
|
inlinestatic |
Name of this algorithm, for error messages.
Definition at line 37 of file constant-term.hh.
|
inline |
Definition at line 48 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::res_.
|
private |
y, yet both operands have a null constant-term.
|
inlineprivate |
Definition at line 62 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 67 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 72 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 77 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 96 of file constant-term.hh.
References vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlineprivate |
Definition at line 97 of file constant-term.hh.
References vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlineprivate |
Definition at line 98 of file constant-term.hh.
References vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlineprivate |
Definition at line 99 of file constant-term.hh.
References vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().
|
inlineprivate |
Definition at line 105 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 110 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 115 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 120 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 125 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.
|
inlineoverrideprivate |
Definition at line 176 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::res_, and vcsn::detail::v.
|
inlineprivate |
Visit a variadic node whose constant-term is the product of the constant-terms of its children.
Definition at line 88 of file constant-term.hh.
References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), 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 183 of file constant-term.hh.
Referenced by vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::operator()(), 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 |