Vcsn
2.3
Be Rational
|
Functor to compute the derivation of an expression. More...
#include <derivation.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 = derivation_visitor |
using | context_t = context_t_of< expressionset_t > |
using | labelset_t = labelset_t_of< context_t > |
using | label_t = label_t_of< context_t > |
using | expression_t = typename expressionset_t::value_t |
using | weightset_t = weightset_t_of< expressionset_t > |
using | weight_t = typename weightset_t::value_t |
using | polynomialset_t = expression_polynomialset_t< expressionset_t > |
using | polynomial_t = typename polynomialset_t::value_t |
using | node_t = typename super_t::node_t |
Public Member Functions | |
derivation_visitor (const expressionset_t &rs) | |
polynomial_t | operator() (const expression_t &v, label_t var) |
Static Public Member Functions | |
static constexpr const char * | me () |
Private Types | |
using | tuple_t = typename super_t::tuple_t |
Private Member Functions | |
VCSN_RAT_VISIT (zero,) | |
VCSN_RAT_VISIT (one,) | |
VCSN_RAT_VISIT (atom, e) | |
VCSN_RAT_VISIT (add, e) | |
VCSN_RAT_VISIT (mul, e) | |
expression_t | prod_ (typename mul_t::iterator begin, typename mul_t::iterator end) const |
Build a product for these expressions. More... | |
VCSN_RAT_VISIT (conjunction, e) | |
VCSN_RAT_VISIT (shuffle, e) | |
VCSN_RAT_VISIT (complement, e) | |
VCSN_RAT_VISIT (star, e) | |
VCSN_RAT_VISIT (lweight, e) | |
VCSN_RAT_VISIT (rweight, e) | |
void | visit (const tuple_t &v, std::true_type) override |
Private Attributes | |
expressionset_t | rs_ |
weightset_t | ws_ = *rs_.weightset() |
Shorthand to the weightset. More... | |
polynomialset_t | ps_ = make_expression_polynomialset(rs_) |
polynomial_t | res_ |
The result. More... | |
label_t | variable_ |
The derivation variable. More... | |
Functor to compute the derivation of an expression.
ExpSet | the expressionset type. |
Definition at line 32 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::context_t = context_t_of<expressionset_t> |
Definition at line 40 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::expression_t = typename expressionset_t::value_t |
Definition at line 43 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::expressionset_t = ExpSet |
Definition at line 36 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::label_t = label_t_of<context_t> |
Definition at line 42 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::labelset_t = labelset_t_of<context_t> |
Definition at line 41 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::node_t = typename super_t::node_t |
Definition at line 50 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::polynomial_t = typename polynomialset_t::value_t |
Definition at line 48 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::polynomialset_t = expression_polynomialset_t<expressionset_t> |
Definition at line 47 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::self_t = derivation_visitor |
Definition at line 38 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::super_t = typename expressionset_t::const_visitor |
Definition at line 37 of file derivation.hh.
|
private |
Definition at line 220 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::weight_t = typename weightset_t::value_t |
Definition at line 45 of file derivation.hh.
using vcsn::rat::derivation_visitor< ExpSet >::weightset_t = weightset_t_of<expressionset_t> |
Definition at line 44 of file derivation.hh.
|
inline |
Definition at line 54 of file derivation.hh.
|
inlinestatic |
Definition at line 52 of file derivation.hh.
|
inline |
Definition at line 59 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::res_, vcsn::rat::derivation_visitor< ExpSet >::rs_, vcsn::rat::to_string(), and vcsn::rat::derivation_visitor< ExpSet >::variable_.
|
inlineprivate |
Build a product for these expressions.
Pay attention to not building products with 0 or 1 expression.
FIXME: Code duplication with to_expansion.
Definition at line 140 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::rs_.
Referenced by vcsn::rat::derivation_visitor< ExpSet >::VCSN_RAT_VISIT().
|
inlineprivate |
Definition at line 82 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::ps_, and vcsn::rat::derivation_visitor< ExpSet >::res_.
|
inlineprivate |
Definition at line 87 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::ps_, and vcsn::rat::derivation_visitor< ExpSet >::res_.
|
inlineprivate |
Definition at line 92 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::ps_, vcsn::rat::derivation_visitor< ExpSet >::res_, and vcsn::rat::derivation_visitor< ExpSet >::variable_.
|
inlineprivate |
Definition at line 100 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::ps_, vcsn::res, vcsn::rat::derivation_visitor< ExpSet >::res_, and vcsn::v.
|
inlineprivate |
Definition at line 111 of file derivation.hh.
References vcsn::constant_term(), vcsn::rat::derivation_visitor< ExpSet >::prod_(), vcsn::rat::derivation_visitor< ExpSet >::ps_, vcsn::res, vcsn::rat::derivation_visitor< ExpSet >::res_, vcsn::rat::derivation_visitor< ExpSet >::rs_, vcsn::v, and vcsn::rat::derivation_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 153 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::ps_, vcsn::res, vcsn::rat::derivation_visitor< ExpSet >::res_, and vcsn::v.
|
inlineprivate |
Definition at line 167 of file derivation.hh.
References vcsn::label_of(), vcsn::rat::derivation_visitor< ExpSet >::ps_, vcsn::res, vcsn::rat::derivation_visitor< ExpSet >::res_, and vcsn::weight_of().
|
inlineprivate |
Definition at line 190 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::ps_, and vcsn::rat::derivation_visitor< ExpSet >::res_.
|
inlineprivate |
Definition at line 196 of file derivation.hh.
References vcsn::constant_term(), vcsn::rat::derivation_visitor< ExpSet >::ps_, vcsn::rat::derivation_visitor< ExpSet >::res_, vcsn::rat::derivation_visitor< ExpSet >::rs_, and vcsn::rat::derivation_visitor< ExpSet >::ws_.
|
inlineprivate |
Definition at line 204 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::ps_, and vcsn::rat::derivation_visitor< ExpSet >::res_.
|
inlineprivate |
Definition at line 210 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::ps_, and vcsn::rat::derivation_visitor< ExpSet >::res_.
|
inlineoverrideprivate |
Definition at line 256 of file derivation.hh.
References vcsn::rat::derivation_visitor< ExpSet >::res_, and vcsn::v.
|
private |
Definition at line 265 of file derivation.hh.
Referenced by vcsn::rat::derivation_visitor< ExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::derivation_visitor< ExpSet >::visit_tuple< bool, Dummy >::work_().
|
private |
The result.
Definition at line 267 of file derivation.hh.
Referenced by vcsn::rat::derivation_visitor< ExpSet >::operator()(), vcsn::rat::derivation_visitor< ExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::derivation_visitor< ExpSet >::visit().
|
private |
Definition at line 262 of file derivation.hh.
Referenced by vcsn::rat::derivation_visitor< ExpSet >::operator()(), vcsn::rat::derivation_visitor< ExpSet >::prod_(), vcsn::rat::derivation_visitor< ExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::derivation_visitor< ExpSet >::visit_tuple< bool, Dummy >::work_().
|
private |
The derivation variable.
Definition at line 269 of file derivation.hh.
Referenced by vcsn::rat::derivation_visitor< ExpSet >::operator()(), vcsn::rat::derivation_visitor< ExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::derivation_visitor< ExpSet >::visit_tuple< bool, Dummy >::work_().
|
private |
Shorthand to the weightset.
Definition at line 264 of file derivation.hh.
Referenced by vcsn::rat::derivation_visitor< ExpSet >::VCSN_RAT_VISIT().