Vcsn
2.0
Be Rational
|
#include <expansionset.hh>
Classes | |
struct | value_t |
An expansion. More... | |
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 | monomial_t = typename polynomialset_t::monomial_t |
using | polys_t = std::map< label_t, polynomial_t, vcsn::less< labelset_t >> |
Public Member Functions | |
expansionset (const ratexpset_t &rs) | |
std::string | vname (bool full=true) const |
The dynamic name. More... | |
std::ostream & | print (const value_t &v, std::ostream &o, symbol format=symbol{"text"}) const |
Print a first order development. More... | |
value_t & | normalize_ (value_t &res, std::true_type) const |
Normalize res: There must not remain a constant-term associated to one: put it with the constant term of the expansion. More... | |
value_t & | normalize_ (value_t &res, std::false_type) const |
value_t & | normalize (value_t &res) const |
value_t & | denormalize_ (value_t &res, std::true_type) const |
Denormalize res move the constant to the polynomial associated to one. More... | |
value_t & | denormalize_ (value_t &res, std::false_type) const |
value_t & | denormalize (value_t &res) const |
value_t | zero () const |
The zero. More... | |
value_t | one () const |
The one. More... | |
value_t | atom (const label_t &l) const |
A single label. More... | |
void | add_here (value_t &lhs, const value_t &rhs) const |
In place addition. More... | |
value_t & | lmul_here (const weight_t &w, value_t &res) const |
Inplace left-multiplication by w of res. More... | |
value_t | rmul (const value_t &lhs, const weight_t &w) const |
Right-multiplication of lhs by w. More... | |
value_t & | rmul_here (value_t &res, const ratexp_t &rhs) const |
In place right multiplication by a ratexp. More... | |
value_t & | ldiv_here (const weight_t &w, value_t &res) const |
Inplace left-division by w of res. More... | |
void | conjunctions_with_one_ (value_t &, const value_t &, const value_t &, std::false_type) const |
void | conjunctions_with_one_ (value_t &res, const value_t &l, const value_t &r, std::true_type) const |
value_t | conjunction (value_t l, value_t r) const |
The conjunction of l and r. More... | |
polynomial_t | as_polynomial (const value_t &v) const |
Convert an expansion to a polynomial. More... | |
ratexp_t | as_ratexp (const polynomial_t &p) const |
Static Public Member Functions | |
static constexpr const char * | me () |
static std::string | sname () |
The static name. More... | |
Private Attributes | |
ratexpset_t | rs_ |
The ratexpset used for the expressions. More... | |
weightset_t | ws_ = *rs_.weightset() |
Shorthand to the weightset. More... | |
polynomialset_t | ps_ = make_ratexp_polynomialset(rs_) |
The polynomialset for the polynomials. More... | |
Definition at line 18 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::context_t = context_t_of<ratexpset_t> |
Definition at line 22 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::label_t = label_t_of<context_t> |
Definition at line 24 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::labelset_t = labelset_t_of<context_t> |
Definition at line 23 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::monomial_t = typename polynomialset_t::monomial_t |
Definition at line 31 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::polynomial_t = typename polynomialset_t::value_t |
Definition at line 30 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::polynomialset_t = ratexp_polynomialset_t<ratexpset_t> |
Definition at line 29 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::polys_t = std::map<label_t, polynomial_t, vcsn::less<labelset_t>> |
Definition at line 38 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::ratexp_t = typename ratexpset_t::value_t |
Definition at line 25 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::ratexpset_t = RatExpSet |
Definition at line 21 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::weight_t = typename weightset_t::value_t |
Definition at line 27 of file expansionset.hh.
using vcsn::rat::expansionset< RatExpSet >::weightset_t = weightset_t_of<ratexpset_t> |
Definition at line 26 of file expansionset.hh.
|
inline |
Definition at line 47 of file expansionset.hh.
|
inline |
In place addition.
Definition at line 164 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inline |
Convert an expansion to a polynomial.
Definition at line 263 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion_as_polynomial().
|
inline |
Definition at line 284 of file expansionset.hh.
|
inline |
A single label.
Definition at line 158 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inline |
The conjunction of l and r.
Definition at line 247 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inline |
Definition at line 210 of file expansionset.hh.
|
inline |
Definition at line 216 of file expansionset.hh.
|
inline |
Definition at line 139 of file expansionset.hh.
|
inline |
Denormalize res move the constant to the polynomial associated to one.
Definition at line 122 of file expansionset.hh.
|
inline |
Definition at line 134 of file expansionset.hh.
|
inline |
Inplace left-division by w of res.
Definition at line 200 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inline |
Inplace left-multiplication by w of res.
Definition at line 172 of file expansionset.hh.
|
inlinestatic |
Definition at line 33 of file expansionset.hh.
|
inline |
Definition at line 114 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inline |
Normalize res: There must not remain a constant-term associated to one: put it with the constant term of the expansion.
Definition at line 91 of file expansionset.hh.
Referenced by vcsn::rat::expansionset< ratexpset_t >::normalize().
|
inline |
Definition at line 109 of file expansionset.hh.
|
inline |
The one.
Definition at line 152 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inline |
Print a first order development.
Definition at line 64 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::print_().
|
inline |
Right-multiplication of lhs by w.
Definition at line 181 of file expansionset.hh.
|
inline |
In place right multiplication by a ratexp.
Definition at line 192 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
inlinestatic |
The static name.
Definition at line 52 of file expansionset.hh.
|
inline |
The dynamic name.
Definition at line 58 of file expansionset.hh.
|
inline |
The zero.
Definition at line 146 of file expansionset.hh.
Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::operator()(), vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion(), and vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().
|
private |
The polynomialset for the polynomials.
Definition at line 298 of file expansionset.hh.
Referenced by vcsn::rat::expansionset< ratexpset_t >::denormalize_().
|
private |
The ratexpset used for the expressions.
Definition at line 294 of file expansionset.hh.
Referenced by vcsn::rat::expansionset< ratexpset_t >::denormalize_(), vcsn::rat::expansionset< ratexpset_t >::normalize_(), and vcsn::rat::expansionset< ratexpset_t >::vname().
|
private |
Shorthand to the weightset.
Definition at line 296 of file expansionset.hh.
Referenced by vcsn::rat::expansionset< ratexpset_t >::denormalize_(), and vcsn::rat::expansionset< ratexpset_t >::normalize_().