Vcsn
2.2
Be Rational
|
Break a rational expression into a polynomial. More...
#include <split.hh>
Public Types | |
using | expressionset_t = ExpSet |
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 | super_t = typename expressionset_t::const_visitor |
using | tuple_t = typename super_t::tuple_t |
Static Public Member Functions | |
static constexpr const char * | me () |
Name of this algorithm, for error messages. More... | |
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... | |
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< ExpSet >::context_t = context_t_of<expressionset_t> |
using vcsn::rat::split_visitor< ExpSet >::expression_t = typename expressionset_t::value_t |
using vcsn::rat::split_visitor< ExpSet >::expressionset_t = ExpSet |
using vcsn::rat::split_visitor< ExpSet >::label_t = label_t_of<context_t> |
using vcsn::rat::split_visitor< ExpSet >::labelset_t = labelset_t_of<context_t> |
using vcsn::rat::split_visitor< ExpSet >::polynomial_t = typename polynomialset_t::value_t |
using vcsn::rat::split_visitor< ExpSet >::polynomialset_t = expression_polynomialset_t<expressionset_t> |
using vcsn::rat::split_visitor< ExpSet >::super_t = typename expressionset_t::const_visitor |
using vcsn::rat::split_visitor< ExpSet >::tuple_t = typename super_t::tuple_t |
using vcsn::rat::split_visitor< ExpSet >::weight_t = typename weightset_t::value_t |
using vcsn::rat::split_visitor< ExpSet >::weightset_t = weightset_t_of<expressionset_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::label_of(), vcsn::rat::split_visitor< ExpSet >::ps_, vcsn::rat::split_visitor< ExpSet >::rs_, vcsn::rat::split_visitor< ExpSet >::split(), and vcsn::weight_of().
Referenced by vcsn::rat::split_visitor< ExpSet >::conjunction(), and vcsn::rat::split_visitor< ExpSet >::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::rat::split_visitor< ExpSet >::conjunction(), vcsn::label_of(), vcsn::rat::split_visitor< ExpSet >::ps_, and vcsn::weight_of().
|
inlinestatic |
Name of this algorithm, for error messages.
Definition at line 95 of file split.hh.
Referenced by vcsn::rat::split_visitor< ExpSet >::visit().
|
inline |
Break an expression into a polynomial.
Definition at line 102 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::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::rat::split_visitor< ExpSet >::ps_, vcsn::rat::split_visitor< ExpSet >::rs_, and vcsn::rat::split_visitor< ExpSet >::split().
Referenced by vcsn::rat::split_visitor< ExpSet >::product(), and vcsn::rat::split_visitor< ExpSet >::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::label_of(), vcsn::rat::split_visitor< ExpSet >::product(), vcsn::rat::split_visitor< ExpSet >::ps_, and vcsn::weight_of().
|
inline |
Easy recursion.
Definition at line 108 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::res_.
Referenced by vcsn::rat::split_visitor< ExpSet >::conjunction(), vcsn::rat::split_visitor< ExpSet >::operator()(), and vcsn::rat::split_visitor< ExpSet >::product().
|
inline |
Definition at line 114 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::ps_, and vcsn::rat::split_visitor< ExpSet >::res_.
|
inline |
Definition at line 119 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::res_, vcsn::rat::split_visitor< ExpSet >::rs_, and vcsn::rat::split_visitor< ExpSet >::ws_.
|
inline |
Definition at line 124 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::res_, vcsn::rat::split_visitor< ExpSet >::rs_, and vcsn::rat::split_visitor< ExpSet >::ws_.
|
inline |
Definition at line 129 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::ps_, vcsn::rat::split_visitor< ExpSet >::res_, and vcsn::detail::v.
|
inline |
Handle an n-ary product.
Definition at line 170 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::product(), and vcsn::rat::split_visitor< ExpSet >::res_.
|
inline |
Handle an n-ary conjunction.
Definition at line 213 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::conjunction(), and vcsn::rat::split_visitor< ExpSet >::res_.
|
inline |
Definition at line 233 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::res_, and vcsn::rat::split_visitor< ExpSet >::ws_.
|
inline |
Definition at line 238 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::ps_, and vcsn::rat::split_visitor< ExpSet >::res_.
|
inline |
Definition at line 244 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::ps_, and vcsn::rat::split_visitor< ExpSet >::res_.
|
inlineoverridevirtual |
Definition at line 228 of file split.hh.
References vcsn::rat::split_visitor< ExpSet >::me().
|
private |
Definition at line 254 of file split.hh.
Referenced by vcsn::rat::split_visitor< ExpSet >::conjunction(), vcsn::rat::split_visitor< ExpSet >::product(), and vcsn::rat::split_visitor< ExpSet >::VCSN_RAT_VISIT().
|
private |
The result.
Definition at line 256 of file split.hh.
Referenced by vcsn::rat::split_visitor< ExpSet >::split(), and vcsn::rat::split_visitor< ExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 251 of file split.hh.
Referenced by vcsn::rat::split_visitor< ExpSet >::conjunction(), vcsn::rat::split_visitor< ExpSet >::product(), and vcsn::rat::split_visitor< ExpSet >::VCSN_RAT_VISIT().
|
private |
Shorthand to the weightset.
Definition at line 253 of file split.hh.
Referenced by vcsn::rat::split_visitor< ExpSet >::VCSN_RAT_VISIT().