Vcsn
2.0
Be Rational
|
#include <to-expansion.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 | expansionset_t = expansionset< ratexpset_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 |
using | polys_t = typename expansionset_t::polys_t |
using | expansion_t = typename expansionset_t::value_t |
Public Member Functions | |
to_expansion_visitor (const ratexpset_t &rs) | |
expansion_t | operator() (const ratexp_t &v) |
expansion_t | to_expansion (const ratexp_t &e) |
polynomial_t | to_expansion_as_polynomial (const ratexp_t &e) |
std::ostream & | print_ (const expansion_t &v, std::ostream &o) const |
Print an expansion. More... | |
Static Public Member Functions | |
static constexpr const char * | me () |
Private Member Functions | |
VCSN_RAT_VISIT (zero,) | |
VCSN_RAT_VISIT (one,) | |
VCSN_RAT_VISIT (atom, e) | |
VCSN_RAT_VISIT (sum, e) | |
VCSN_RAT_VISIT (prod, e) | |
ratexp_t | prod_ (typename prod_t::iterator begin, typename prod_t::iterator end) const |
Build a product for these expressions. More... | |
label_t | one_ (std::true_type) |
label_t | one_ (std::false_type) |
ratexp_t | star_child (const ratexp_t r) |
If r is e*, return e. More... | |
VCSN_RAT_VISIT (ldiv, e) | |
VCSN_RAT_VISIT (conjunction, e) | |
VCSN_RAT_VISIT (shuffle, e) | |
VCSN_RAT_VISIT (complement, e) | |
template<bool IsFree> | |
std::enable_if<!IsFree, void > ::type | visit_complement (const complement_t &) |
Cannot complement on a non-free labelset. More... | |
template<bool IsFree> | |
std::enable_if< IsFree, void > ::type | visit_complement (const complement_t &e) |
Complement on a free labelset. More... | |
VCSN_RAT_VISIT (transposition, e) | |
VCSN_RAT_VISIT (star, e) | |
VCSN_RAT_VISIT (lweight, e) | |
VCSN_RAT_VISIT (rweight, e) | |
Private Attributes | |
ratexpset_t | rs_ |
Manipulate the ratexps. More... | |
labelset_t | ls_ = *rs_.labelset() |
Manipulate the labels. More... | |
weightset_t | ws_ = *rs_.weightset() |
Manipulate the weights. More... | |
polynomialset_t | ps_ = make_ratexp_polynomialset(rs_) |
Manipulate the polynomials of ratexps. More... | |
expansionset_t | es_ = expansionset_t(rs_) |
Manipulate the expansions. More... | |
bool | transposed_ = false |
Whether to work transposed. More... | |
expansion_t | res_ |
The result. More... | |
Definition at line 40 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::context_t = context_t_of<ratexpset_t> |
Definition at line 45 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::expansion_t = typename expansionset_t::value_t |
Definition at line 61 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::expansionset_t = expansionset<ratexpset_t> |
Definition at line 51 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::label_t = label_t_of<context_t> |
Definition at line 47 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::labelset_t = labelset_t_of<context_t> |
Definition at line 46 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::polynomial_t = typename polynomialset_t::value_t |
Definition at line 54 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::polynomialset_t = ratexp_polynomialset_t<ratexpset_t> |
Definition at line 53 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::polys_t = typename expansionset_t::polys_t |
Definition at line 60 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::ratexp_t = typename ratexpset_t::value_t |
Definition at line 48 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::ratexpset_t = RatExpSet |
Definition at line 44 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::super_t = typename ratexpset_t::const_visitor |
Definition at line 56 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::weight_t = typename weightset_t::value_t |
Definition at line 50 of file to-expansion.hh.
using vcsn::rat::to_expansion_visitor< RatExpSet >::weightset_t = weightset_t_of<ratexpset_t> |
Definition at line 49 of file to-expansion.hh.
|
inline |
Definition at line 63 of file to-expansion.hh.
|
inlinestatic |
Definition at line 58 of file to-expansion.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::one_(), and vcsn::rat::to_expansion_visitor< RatExpSet >::visit_complement().
|
inlineprivate |
Definition at line 208 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::rs_.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inlineprivate |
Definition at line 213 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::me().
|
inline |
Definition at line 67 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, and vcsn::rat::expansionset< RatExpSet >::zero().
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion_as_polynomial().
|
inline |
Print an expansion.
Definition at line 124 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::expansionset< RatExpSet >::print(), and vcsn::rat::to_expansion_visitor< RatExpSet >::transposed_.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), and vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inlineprivate |
Build a product for these expressions.
Pay attention to not building products with 0 or 1 expression.
Definition at line 196 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::rs_.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inlineprivate |
If r is e*, return e.
If r is e*{T}, return e{T}. Otherwise return nullptr.
FIXME: What about complement?
Definition at line 223 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::rs_.
|
inline |
Definition at line 80 of file to-expansion.hh.
References DEBUG_IF, vcsn::decendl(), vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::iendl(), vcsn::incendl(), vcsn::rat::to_expansion_visitor< RatExpSet >::print_(), vcsn::rat::to_expansion_visitor< RatExpSet >::res_, vcsn::rat::to_expansion_visitor< RatExpSet >::rs_, and vcsn::rat::expansionset< RatExpSet >::zero().
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::to_expansion_visitor< RatExpSet >::visit_complement().
|
inline |
Definition at line 117 of file to-expansion.hh.
References vcsn::rat::expansionset< RatExpSet >::as_polynomial(), vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::to_expansion_visitor< RatExpSet >::operator()(), and vcsn::rat::to_expansion_visitor< RatExpSet >::res_.
|
inlineprivate |
Definition at line 133 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, and vcsn::rat::expansionset< RatExpSet >::zero().
|
inlineprivate |
Definition at line 138 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::expansionset< RatExpSet >::one(), and vcsn::rat::to_expansion_visitor< RatExpSet >::res_.
|
inlineprivate |
Definition at line 143 of file to-expansion.hh.
References vcsn::rat::expansionset< RatExpSet >::atom(), vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::to_expansion_visitor< RatExpSet >::ls_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, and vcsn::rat::to_expansion_visitor< RatExpSet >::transposed_.
|
inlineprivate |
Definition at line 150 of file to-expansion.hh.
References vcsn::rat::expansionset< RatExpSet >::add_here(), vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), and vcsn::rat::expansionset< RatExpSet >::zero().
|
inlineprivate |
Definition at line 157 of file to-expansion.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::polynomialset< Context >::lmul(), vcsn::rat::expansionset< RatExpSet >::one(), vcsn::rat::to_expansion_visitor< RatExpSet >::prod_(), vcsn::rat::to_expansion_visitor< RatExpSet >::ps_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, vcsn::rat::expansionset< RatExpSet >::rmul_here(), vcsn::rat::to_expansion_visitor< RatExpSet >::rs_, vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), vcsn::rat::to_expansion_visitor< RatExpSet >::transposed_, and vcsn::rat::to_expansion_visitor< RatExpSet >::ws_.
|
inlineprivate |
Definition at line 235 of file to-expansion.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::rat::expansionset< RatExpSet >::add_here(), DEBUG_IF, vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::expansionset< RatExpSet >::ldiv_here(), vcsn::rat::expansionset< RatExpSet >::normalize(), vcsn::rat::to_expansion_visitor< RatExpSet >::one_(), vcsn::rat::to_expansion_visitor< RatExpSet >::print_(), vcsn::rat::to_expansion_visitor< RatExpSet >::ps_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, vcsn::rat::to_expansion_visitor< RatExpSet >::rs_, vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), vcsn::rat::to_expansion_visitor< RatExpSet >::transposed_, vcsn::rat::to_expansion_visitor< RatExpSet >::ws_, vcsn::rat::expansionset< RatExpSet >::zero(), and vcsn::zip_maps().
|
inlineprivate |
Definition at line 282 of file to-expansion.hh.
References vcsn::rat::expansionset< RatExpSet >::conjunction(), vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, and vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion().
|
inlineprivate |
Definition at line 290 of file to-expansion.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::rat::to_expansion_visitor< RatExpSet >::es_, vcsn::rat::expansionset< RatExpSet >::one(), vcsn::rat::to_expansion_visitor< RatExpSet >::ps_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, vcsn::rat::to_expansion_visitor< RatExpSet >::rs_, vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), and vcsn::rat::to_expansion_visitor< RatExpSet >::ws_.
|
inlineprivate |
Definition at line 322 of file to-expansion.hh.
|
inlineprivate |
Definition at line 353 of file to-expansion.hh.
|
inlineprivate |
Definition at line 360 of file to-expansion.hh.
References vcsn::to_expansion().
|
inlineprivate |
Definition at line 377 of file to-expansion.hh.
References vcsn::to_expansion().
|
inlineprivate |
Definition at line 387 of file to-expansion.hh.
References vcsn::to_expansion().
|
inlineprivate |
Cannot complement on a non-free labelset.
Definition at line 331 of file to-expansion.hh.
References vcsn::rat::to_expansion_visitor< RatExpSet >::me().
|
inlineprivate |
Complement on a free labelset.
Definition at line 339 of file to-expansion.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::rat::to_expansion_visitor< RatExpSet >::ps_, vcsn::rat::to_expansion_visitor< RatExpSet >::res_, vcsn::rat::to_expansion_visitor< RatExpSet >::rs_, vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), and vcsn::rat::to_expansion_visitor< RatExpSet >::ws_.
|
private |
Manipulate the expansions.
Definition at line 406 of file to-expansion.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::operator()(), vcsn::rat::to_expansion_visitor< RatExpSet >::print_(), vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion_as_polynomial(), and vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
private |
Manipulate the labels.
Definition at line 400 of file to-expansion.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
private |
Manipulate the polynomials of ratexps.
Definition at line 404 of file to-expansion.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::to_expansion_visitor< RatExpSet >::visit_complement().
|
private |
The result.
Definition at line 411 of file to-expansion.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::operator()(), vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion_as_polynomial(), vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::to_expansion_visitor< RatExpSet >::visit_complement().
|
private |
Manipulate the ratexps.
Definition at line 398 of file to-expansion.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::one_(), vcsn::rat::to_expansion_visitor< RatExpSet >::prod_(), vcsn::rat::to_expansion_visitor< RatExpSet >::star_child(), vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::to_expansion_visitor< RatExpSet >::visit_complement().
|
private |
Whether to work transposed.
Definition at line 409 of file to-expansion.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::print_(), and vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
private |
Manipulate the weights.
Definition at line 402 of file to-expansion.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT(), and vcsn::rat::to_expansion_visitor< RatExpSet >::visit_complement().