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

#include <to-expansion.hh>

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

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 charme ()
 

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...
 

Detailed Description

template<typename RatExpSet>
class vcsn::rat::to_expansion_visitor< RatExpSet >

Definition at line 40 of file to-expansion.hh.

Member Typedef Documentation

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

Definition at line 45 of file to-expansion.hh.

template<typename RatExpSet >
using vcsn::rat::to_expansion_visitor< RatExpSet >::expansion_t = typename expansionset_t::value_t

Definition at line 61 of file to-expansion.hh.

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

Definition at line 51 of file to-expansion.hh.

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

Definition at line 47 of file to-expansion.hh.

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

Definition at line 46 of file to-expansion.hh.

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

Definition at line 54 of file to-expansion.hh.

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

Definition at line 53 of file to-expansion.hh.

template<typename RatExpSet >
using vcsn::rat::to_expansion_visitor< RatExpSet >::polys_t = typename expansionset_t::polys_t

Definition at line 60 of file to-expansion.hh.

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

Definition at line 48 of file to-expansion.hh.

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

Definition at line 44 of file to-expansion.hh.

template<typename RatExpSet >
using vcsn::rat::to_expansion_visitor< RatExpSet >::super_t = typename ratexpset_t::const_visitor

Definition at line 56 of file to-expansion.hh.

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

Definition at line 50 of file to-expansion.hh.

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

Definition at line 49 of file to-expansion.hh.

Constructor & Destructor Documentation

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

Definition at line 63 of file to-expansion.hh.

Member Function Documentation

template<typename RatExpSet >
static constexpr const char* vcsn::rat::to_expansion_visitor< RatExpSet >::me ( )
inlinestatic
template<typename RatExpSet >
label_t vcsn::rat::to_expansion_visitor< RatExpSet >::one_ ( std::true_type  )
inlineprivate
template<typename RatExpSet >
label_t vcsn::rat::to_expansion_visitor< RatExpSet >::one_ ( std::false_type  )
inlineprivate

Definition at line 213 of file to-expansion.hh.

References vcsn::rat::to_expansion_visitor< RatExpSet >::me().

Here is the call graph for this function:

template<typename RatExpSet >
expansion_t vcsn::rat::to_expansion_visitor< RatExpSet >::operator() ( const ratexp_t v)
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().

Here is the call graph for this function:

template<typename RatExpSet >
std::ostream& vcsn::rat::to_expansion_visitor< RatExpSet >::print_ ( const expansion_t v,
std::ostream &  o 
) const
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().

Here is the call graph for this function:

template<typename RatExpSet >
ratexp_t vcsn::rat::to_expansion_visitor< RatExpSet >::prod_ ( typename prod_t::iterator  begin,
typename prod_t::iterator  end 
) const
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().

template<typename RatExpSet >
ratexp_t vcsn::rat::to_expansion_visitor< RatExpSet >::star_child ( const ratexp_t  r)
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_.

template<typename RatExpSet >
polynomial_t vcsn::rat::to_expansion_visitor< RatExpSet >::to_expansion_as_polynomial ( const ratexp_t e)
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_.

Here is the call graph for this function:

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( zero  )
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().

Here is the call graph for this function:

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( one  )
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_.

Here is the call graph for this function:

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( atom  ,
 
)
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_.

Here is the call graph for this function:

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( sum  ,
 
)
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().

Here is the call graph for this function:

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( conjunction  ,
 
)
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().

Here is the call graph for this function:

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( complement  ,
 
)
inlineprivate

Definition at line 322 of file to-expansion.hh.

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( transposition  ,
 
)
inlineprivate

Definition at line 353 of file to-expansion.hh.

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( star  ,
 
)
inlineprivate

Definition at line 360 of file to-expansion.hh.

References vcsn::to_expansion().

Here is the call graph for this function:

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( lweight  ,
 
)
inlineprivate

Definition at line 377 of file to-expansion.hh.

References vcsn::to_expansion().

Here is the call graph for this function:

template<typename RatExpSet >
vcsn::rat::to_expansion_visitor< RatExpSet >::VCSN_RAT_VISIT ( rweight  ,
 
)
inlineprivate

Definition at line 387 of file to-expansion.hh.

References vcsn::to_expansion().

Here is the call graph for this function:

template<typename RatExpSet >
template<bool IsFree>
std::enable_if<!IsFree, void>::type vcsn::rat::to_expansion_visitor< RatExpSet >::visit_complement ( const complement_t &  )
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().

Here is the call graph for this function:

template<typename RatExpSet >
template<bool IsFree>
std::enable_if<IsFree, void>::type vcsn::rat::to_expansion_visitor< RatExpSet >::visit_complement ( const complement_t &  e)
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_.

Here is the call graph for this function:

Member Data Documentation

template<typename RatExpSet >
labelset_t vcsn::rat::to_expansion_visitor< RatExpSet >::ls_ = *rs_.labelset()
private

Manipulate the labels.

Definition at line 400 of file to-expansion.hh.

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

template<typename RatExpSet >
polynomialset_t vcsn::rat::to_expansion_visitor< RatExpSet >::ps_ = make_ratexp_polynomialset(rs_)
private
template<typename RatExpSet >
bool vcsn::rat::to_expansion_visitor< RatExpSet >::transposed_ = false
private
template<typename RatExpSet >
weightset_t vcsn::rat::to_expansion_visitor< RatExpSet >::ws_ = *rs_.weightset()
private

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