Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::rat::expansionset< RatExpSet > Struct Template Reference

#include <expansionset.hh>

Inheritance diagram for vcsn::rat::expansionset< RatExpSet >:
Collaboration diagram for vcsn::rat::expansionset< RatExpSet >:

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_tnormalize_ (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_tnormalize_ (value_t &res, std::false_type) const
 
value_tnormalize (value_t &res) const
 
value_tdenormalize_ (value_t &res, std::true_type) const
 Denormalize res move the constant to the polynomial associated to one. More...
 
value_tdenormalize_ (value_t &res, std::false_type) const
 
value_tdenormalize (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_tlmul_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_trmul_here (value_t &res, const ratexp_t &rhs) const
 In place right multiplication by a ratexp. More...
 
value_tldiv_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 charme ()
 
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...
 

Detailed Description

template<typename RatExpSet>
struct vcsn::rat::expansionset< RatExpSet >

Definition at line 18 of file expansionset.hh.

Member Typedef Documentation

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::context_t = context_t_of<ratexpset_t>

Definition at line 22 of file expansionset.hh.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::label_t = label_t_of<context_t>

Definition at line 24 of file expansionset.hh.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::labelset_t = labelset_t_of<context_t>

Definition at line 23 of file expansionset.hh.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::monomial_t = typename polynomialset_t::monomial_t

Definition at line 31 of file expansionset.hh.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::polynomial_t = typename polynomialset_t::value_t

Definition at line 30 of file expansionset.hh.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::polynomialset_t = ratexp_polynomialset_t<ratexpset_t>

Definition at line 29 of file expansionset.hh.

template<typename RatExpSet>
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.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::ratexp_t = typename ratexpset_t::value_t

Definition at line 25 of file expansionset.hh.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::ratexpset_t = RatExpSet

Definition at line 21 of file expansionset.hh.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::weight_t = typename weightset_t::value_t

Definition at line 27 of file expansionset.hh.

template<typename RatExpSet>
using vcsn::rat::expansionset< RatExpSet >::weightset_t = weightset_t_of<ratexpset_t>

Definition at line 26 of file expansionset.hh.

Constructor & Destructor Documentation

template<typename RatExpSet>
vcsn::rat::expansionset< RatExpSet >::expansionset ( const ratexpset_t rs)
inline

Definition at line 47 of file expansionset.hh.

Member Function Documentation

template<typename RatExpSet>
void vcsn::rat::expansionset< RatExpSet >::add_here ( value_t lhs,
const value_t rhs 
) const
inline

In place addition.

Definition at line 164 of file expansionset.hh.

Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().

template<typename RatExpSet>
polynomial_t vcsn::rat::expansionset< RatExpSet >::as_polynomial ( const value_t v) const
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().

template<typename RatExpSet>
ratexp_t vcsn::rat::expansionset< RatExpSet >::as_ratexp ( const polynomial_t p) const
inline

Definition at line 284 of file expansionset.hh.

template<typename RatExpSet>
value_t vcsn::rat::expansionset< RatExpSet >::atom ( const label_t l) const
inline

A single label.

Definition at line 158 of file expansionset.hh.

Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().

template<typename RatExpSet>
value_t vcsn::rat::expansionset< RatExpSet >::conjunction ( value_t  l,
value_t  r 
) const
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().

template<typename RatExpSet>
void vcsn::rat::expansionset< RatExpSet >::conjunctions_with_one_ ( value_t ,
const value_t ,
const value_t ,
std::false_type   
) const
inline

Definition at line 210 of file expansionset.hh.

template<typename RatExpSet>
void vcsn::rat::expansionset< RatExpSet >::conjunctions_with_one_ ( value_t res,
const value_t l,
const value_t r,
std::true_type   
) const
inline

Definition at line 216 of file expansionset.hh.

template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::denormalize ( value_t res) const
inline

Definition at line 139 of file expansionset.hh.

template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::denormalize_ ( value_t res,
std::true_type   
) const
inline

Denormalize res move the constant to the polynomial associated to one.

Definition at line 122 of file expansionset.hh.

template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::denormalize_ ( value_t res,
std::false_type   
) const
inline

Definition at line 134 of file expansionset.hh.

template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::ldiv_here ( const weight_t w,
value_t res 
) const
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().

template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::lmul_here ( const weight_t w,
value_t res 
) const
inline

Inplace left-multiplication by w of res.

Definition at line 172 of file expansionset.hh.

template<typename RatExpSet>
static constexpr const char* vcsn::rat::expansionset< RatExpSet >::me ( )
inlinestatic

Definition at line 33 of file expansionset.hh.

template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::normalize ( value_t res) const
inline
template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::normalize_ ( value_t res,
std::true_type   
) const
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().

template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::normalize_ ( value_t res,
std::false_type   
) const
inline

Definition at line 109 of file expansionset.hh.

template<typename RatExpSet>
value_t vcsn::rat::expansionset< RatExpSet >::one ( ) const
inline

The one.

Definition at line 152 of file expansionset.hh.

Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT().

template<typename RatExpSet>
std::ostream& vcsn::rat::expansionset< RatExpSet >::print ( const value_t v,
std::ostream &  o,
symbol  format = symbol{"text"} 
) const
inline

Print a first order development.

Definition at line 64 of file expansionset.hh.

Referenced by vcsn::rat::to_expansion_visitor< RatExpSet >::print_().

template<typename RatExpSet>
value_t vcsn::rat::expansionset< RatExpSet >::rmul ( const value_t lhs,
const weight_t w 
) const
inline

Right-multiplication of lhs by w.

Definition at line 181 of file expansionset.hh.

template<typename RatExpSet>
value_t& vcsn::rat::expansionset< RatExpSet >::rmul_here ( value_t res,
const ratexp_t rhs 
) const
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().

template<typename RatExpSet>
static std::string vcsn::rat::expansionset< RatExpSet >::sname ( )
inlinestatic

The static name.

Definition at line 52 of file expansionset.hh.

template<typename RatExpSet>
std::string vcsn::rat::expansionset< RatExpSet >::vname ( bool  full = true) const
inline

The dynamic name.

Definition at line 58 of file expansionset.hh.

Member Data Documentation

template<typename RatExpSet>
polynomialset_t vcsn::rat::expansionset< RatExpSet >::ps_ = make_ratexp_polynomialset(rs_)
private

The polynomialset for the polynomials.

Definition at line 298 of file expansionset.hh.

Referenced by vcsn::rat::expansionset< ratexpset_t >::denormalize_().

template<typename RatExpSet>
ratexpset_t vcsn::rat::expansionset< RatExpSet >::rs_
private
template<typename RatExpSet>
weightset_t vcsn::rat::expansionset< RatExpSet >::ws_ = *rs_.weightset()
private

The documentation for this struct was generated from the following file: