![]() |
Vcsn
2.0
Be Rational
|
Break a rational expression into a polynomial. More...
#include <split.hh>
Public Types | |
| using | ratexpset_t = RatExpSet |
| using | context_t = context_t_of< ratexpset_t > |
| using | labelset_t = labelset_t_of< context_t > |
| using | label_t = label_t_of< context_t > |
| using | ratexp_t = typename ratexpset_t::value_t |
| using | weightset_t = weightset_t_of< ratexpset_t > |
| using | weight_t = typename weightset_t::value_t |
| using | polynomialset_t = ratexp_polynomialset_t< ratexpset_t > |
| using | polynomial_t = typename polynomialset_t::value_t |
| using | super_t = typename ratexpset_t::const_visitor |
Public Member Functions | |
| split_visitor (const ratexpset_t &rs) | |
| polynomial_t | operator() (const ratexp_t &v) |
| Break a ratexp into a polynomial. More... | |
| polynomial_t | split (const ratexp_t &v) |
| Easy recursion. More... | |
| VCSN_RAT_VISIT (zero,) | |
| VCSN_RAT_VISIT (one,) | |
| VCSN_RAT_VISIT (atom, e) | |
| VCSN_RAT_VISIT (sum, e) | |
| polynomial_t | product (const ratexp_t &l, const ratexp_t &r) |
| The split-product of l with r. More... | |
| polynomial_t | product (const polynomial_t &l, const ratexp_t &r) |
| The split-product of l with r. More... | |
| VCSN_RAT_VISIT (prod, e) | |
| Handle an n-ary product. More... | |
| polynomial_t | conjunction (const ratexp_t &l, const ratexp_t &r) |
| The split-product of l with r. More... | |
| polynomial_t | conjunction (const polynomial_t &l, const ratexp_t &r) |
| The split-product of l with r. More... | |
| VCSN_RAT_VISIT (conjunction, e) | |
| Handle an n-ary conjunction. More... | |
| VCSN_RAT_VISIT (star, e) | |
| VCSN_RAT_VISIT (lweight, e) | |
| VCSN_RAT_VISIT (rweight, e) | |
Static Public Member Functions | |
| static constexpr const char * | me () |
Private Attributes | |
| ratexpset_t | rs_ |
| weightset_t | ws_ = *rs_.weightset() |
| Shorthand to the weightset. More... | |
| polynomialset_t | ps_ = make_ratexp_polynomialset(rs_) |
| polynomial_t | res_ |
| The result. More... | |
Break a rational expression into a polynomial.
This is based on the following paper:
/// @article{angrand.2010.jalc,
/// author = {Pierre-Yves Angrand and Sylvain Lombardy and Jacques
/// Sakarovitch},
/// journal = {Journal of Automata, Languages and Combinatorics},
/// number = {1/2},
/// pages = {27--51},
/// title = {On the Number of Broken Derived Terms of a Rational
/// Expression},
/// volume = 15,
/// year = 2010,
/// abstract = {Bounds are given on the number of broken derived
/// terms (a variant of Antimirov's ``partial
/// derivatives'') of a rational expression $E$. It is
/// shown that this number is less than or equal to
/// $2l(E) + 1$ in the general case, where $l(E)$ is the
/// literal length of the expression $E$, and that the
/// classical bound $l(E) + 1$ which holds for partial
/// derivatives also holds for broken derived terms if E
/// is in star normal form.\\In a second part of the
/// paper, the influence of the bracketing of an
/// expression on the number of its derived terms is
/// also discussed.}
/// }
///
| using vcsn::rat::split_visitor< RatExpSet >::context_t = context_t_of<ratexpset_t> |
| using vcsn::rat::split_visitor< RatExpSet >::label_t = label_t_of<context_t> |
| using vcsn::rat::split_visitor< RatExpSet >::labelset_t = labelset_t_of<context_t> |
| using vcsn::rat::split_visitor< RatExpSet >::polynomial_t = typename polynomialset_t::value_t |
| using vcsn::rat::split_visitor< RatExpSet >::polynomialset_t = ratexp_polynomialset_t<ratexpset_t> |
| using vcsn::rat::split_visitor< RatExpSet >::ratexp_t = typename ratexpset_t::value_t |
| using vcsn::rat::split_visitor< RatExpSet >::ratexpset_t = RatExpSet |
| using vcsn::rat::split_visitor< RatExpSet >::super_t = typename ratexpset_t::const_visitor |
| using vcsn::rat::split_visitor< RatExpSet >::weight_t = typename weightset_t::value_t |
| using vcsn::rat::split_visitor< RatExpSet >::weightset_t = weightset_t_of<ratexpset_t> |
|
inline |
|
inline |
The split-product of l with r.
Returns split(l) x split(r). FIXME: This is inefficient, we split the lhs way too often.
Definition at line 182 of file split.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::polynomialset< Context >::del_weight(), vcsn::polynomialset< Context >::get_weight(), vcsn::polynomialset< Context >::lmul(), vcsn::rat::split_visitor< RatExpSet >::ps_, vcsn::rat::split_visitor< RatExpSet >::rs_, and vcsn::rat::split_visitor< RatExpSet >::split().
Referenced by vcsn::rat::split_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inline |
The split-product of l with r.
Returns l x split(r).
Definition at line 204 of file split.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::polynomialset< Context >::lmul(), and vcsn::rat::split_visitor< RatExpSet >::ps_.
|
inlinestatic |
|
inline |
Break a ratexp into a polynomial.
Definition at line 102 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::split().
|
inline |
The split-product of l with r.
Returns split(l) x split(r). FIXME: This is inefficient, we split the lhs way too often.
Definition at line 144 of file split.hh.
References vcsn::polynomialset< Context >::add(), vcsn::polynomialset< Context >::del_weight(), vcsn::polynomialset< Context >::get_weight(), vcsn::polynomialset< Context >::lmul(), vcsn::rat::split_visitor< RatExpSet >::ps_, vcsn::polynomialset< Context >::rmul(), vcsn::rat::split_visitor< RatExpSet >::rs_, and vcsn::rat::split_visitor< RatExpSet >::split().
Referenced by vcsn::rat::split_visitor< RatExpSet >::product(), and vcsn::rat::split_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inline |
The split-product of l with r.
Returns l x split(r).
Definition at line 161 of file split.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::polynomialset< Context >::lmul(), vcsn::rat::split_visitor< RatExpSet >::product(), and vcsn::rat::split_visitor< RatExpSet >::ps_.
|
inline |
Easy recursion.
Definition at line 108 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::res_.
Referenced by vcsn::rat::split_visitor< RatExpSet >::conjunction(), vcsn::rat::split_visitor< RatExpSet >::operator()(), and vcsn::rat::split_visitor< RatExpSet >::product().
|
inline |
Definition at line 114 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::ps_, vcsn::rat::split_visitor< RatExpSet >::res_, and vcsn::polynomialset< Context >::zero().
|
inline |
Definition at line 119 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::res_, vcsn::rat::split_visitor< RatExpSet >::rs_, and vcsn::rat::split_visitor< RatExpSet >::ws_.
|
inline |
Definition at line 124 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::res_, vcsn::rat::split_visitor< RatExpSet >::rs_, and vcsn::rat::split_visitor< RatExpSet >::ws_.
|
inline |
Definition at line 129 of file split.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::rat::split_visitor< RatExpSet >::ps_, vcsn::rat::split_visitor< RatExpSet >::res_, and vcsn::polynomialset< Context >::zero().
|
inline |
Handle an n-ary product.
Definition at line 170 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::product(), and vcsn::rat::split_visitor< RatExpSet >::res_.
|
inline |
Handle an n-ary conjunction.
Definition at line 213 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::conjunction(), and vcsn::rat::split_visitor< RatExpSet >::res_.
|
inline |
Definition at line 226 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::res_, and vcsn::rat::split_visitor< RatExpSet >::ws_.
|
inline |
Definition at line 231 of file split.hh.
References vcsn::polynomialset< Context >::lmul(), vcsn::rat::split_visitor< RatExpSet >::ps_, and vcsn::rat::split_visitor< RatExpSet >::res_.
|
inline |
Definition at line 237 of file split.hh.
References vcsn::rat::split_visitor< RatExpSet >::ps_, vcsn::rat::split_visitor< RatExpSet >::res_, and vcsn::polynomialset< Context >::rmul().
|
private |
Definition at line 247 of file split.hh.
Referenced by vcsn::rat::split_visitor< RatExpSet >::conjunction(), vcsn::rat::split_visitor< RatExpSet >::product(), and vcsn::rat::split_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
private |
The result.
Definition at line 249 of file split.hh.
Referenced by vcsn::rat::split_visitor< RatExpSet >::split(), and vcsn::rat::split_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 244 of file split.hh.
Referenced by vcsn::rat::split_visitor< RatExpSet >::conjunction(), vcsn::rat::split_visitor< RatExpSet >::product(), and vcsn::rat::split_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
private |
Shorthand to the weightset.
Definition at line 246 of file split.hh.
Referenced by vcsn::rat::split_visitor< RatExpSet >::VCSN_RAT_VISIT().