Vcsn  2.2
Be Rational
vcsn::rat::constant_term_visitor< ExpSet > Class Template Reference

A functor to compute the constant term of an expression. More...

#include <constant-term.hh>

Inheritance diagram for vcsn::rat::constant_term_visitor< ExpSet >:
Collaboration diagram for vcsn::rat::constant_term_visitor< ExpSet >:

Classes

struct  visit_tuple
 
struct  visit_tuple< false, Dummy >
 

Public Types

using expressionset_t = ExpSet
 
using super_t = typename expressionset_t::const_visitor
 
using self_t = constant_term_visitor
 
using context_t = context_t_of< expressionset_t >
 
using expression_t = typename expressionset_t::value_t
 
using weight_t = weight_t_of< expressionset_t >
 
using weightset_t = weightset_t_of< expressionset_t >
 

Public Member Functions

 constant_term_visitor (const weightset_t &ws)
 
 constant_term_visitor (const expressionset_t &rs)
 
weight_t operator() (const expression_t &v)
 

Static Public Member Functions

static constexpr const charme ()
 Name of this algorithm, for error messages. More...
 

Private Types

using tuple_t = typename super_t::tuple_t
 

Private Member Functions

weight_t constant_term (const expression_t &v)
 Easy recursion. More...
 
 VCSN_RAT_VISIT (zero,)
 
 VCSN_RAT_VISIT (one,)
 
 VCSN_RAT_VISIT (atom,)
 
 VCSN_RAT_VISIT (sum, v)
 
template<typename Node >
void visit_product (const Node &v)
 Visit a variadic node whose constant-term is the product of the constant-terms of its children. More...
 
 VCSN_RAT_VISIT (conjunction, v)
 
 VCSN_RAT_VISIT (infiltration, v)
 
 VCSN_RAT_VISIT (prod, v)
 
 VCSN_RAT_VISIT (shuffle, v)
 
 VCSN_RAT_UNSUPPORTED (ldiv)
 y, yet both operands have a null constant-term. More...
 
 VCSN_RAT_VISIT (transposition, v)
 
 VCSN_RAT_VISIT (star, v)
 
 VCSN_RAT_VISIT (lweight, v)
 
 VCSN_RAT_VISIT (rweight, v)
 
 VCSN_RAT_VISIT (complement, v)
 
void visit (const tuple_t &v, std::true_type) override
 

Private Attributes

weightset_t ws_
 
weight_t res_
 

Detailed Description

template<typename ExpSet>
class vcsn::rat::constant_term_visitor< ExpSet >

A functor to compute the constant term of an expression.

Template Parameters
ExpSetthe expressionset type.

Definition at line 23 of file constant-term.hh.

Member Typedef Documentation

template<typename ExpSet >
using vcsn::rat::constant_term_visitor< ExpSet >::context_t = context_t_of<expressionset_t>

Definition at line 31 of file constant-term.hh.

template<typename ExpSet >
using vcsn::rat::constant_term_visitor< ExpSet >::expression_t = typename expressionset_t::value_t

Definition at line 32 of file constant-term.hh.

template<typename ExpSet >
using vcsn::rat::constant_term_visitor< ExpSet >::expressionset_t = ExpSet

Definition at line 27 of file constant-term.hh.

template<typename ExpSet >
using vcsn::rat::constant_term_visitor< ExpSet >::self_t = constant_term_visitor

Definition at line 29 of file constant-term.hh.

template<typename ExpSet >
using vcsn::rat::constant_term_visitor< ExpSet >::super_t = typename expressionset_t::const_visitor

Definition at line 28 of file constant-term.hh.

template<typename ExpSet >
using vcsn::rat::constant_term_visitor< ExpSet >::tuple_t = typename super_t::tuple_t
private

Definition at line 137 of file constant-term.hh.

template<typename ExpSet >
using vcsn::rat::constant_term_visitor< ExpSet >::weight_t = weight_t_of<expressionset_t>

Definition at line 33 of file constant-term.hh.

template<typename ExpSet >
using vcsn::rat::constant_term_visitor< ExpSet >::weightset_t = weightset_t_of<expressionset_t>

Definition at line 34 of file constant-term.hh.

Constructor & Destructor Documentation

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::constant_term_visitor ( const weightset_t ws)
inline

Definition at line 39 of file constant-term.hh.

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::constant_term_visitor ( const expressionset_t rs)
inline

Definition at line 43 of file constant-term.hh.

Member Function Documentation

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

Name of this algorithm, for error messages.

Definition at line 37 of file constant-term.hh.

template<typename ExpSet >
weight_t vcsn::rat::constant_term_visitor< ExpSet >::operator() ( const expression_t v)
inline

Definition at line 48 of file constant-term.hh.

References vcsn::rat::constant_term_visitor< ExpSet >::res_.

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_UNSUPPORTED ( ldiv  )
private

y, yet both operands have a null constant-term.

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( zero  )
inlineprivate
template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( one  )
inlineprivate
template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( atom  )
inlineprivate
template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( sum  ,
 
)
inlineprivate

Definition at line 77 of file constant-term.hh.

References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( conjunction  ,
 
)
inlineprivate

Definition at line 96 of file constant-term.hh.

References vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( infiltration  ,
 
)
inlineprivate

Definition at line 97 of file constant-term.hh.

References vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( prod  ,
 
)
inlineprivate

Definition at line 98 of file constant-term.hh.

References vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( shuffle  ,
 
)
inlineprivate

Definition at line 99 of file constant-term.hh.

References vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::visit_product().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( transposition  ,
 
)
inlineprivate

Definition at line 105 of file constant-term.hh.

References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( star  ,
 
)
inlineprivate

Definition at line 110 of file constant-term.hh.

References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( lweight  ,
 
)
inlineprivate

Definition at line 115 of file constant-term.hh.

References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( rweight  ,
 
)
inlineprivate

Definition at line 120 of file constant-term.hh.

References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT ( complement  ,
 
)
inlineprivate

Definition at line 125 of file constant-term.hh.

References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, vcsn::detail::v, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.

Here is the call graph for this function:

template<typename ExpSet >
void vcsn::rat::constant_term_visitor< ExpSet >::visit ( const tuple_t v,
std::true_type   
)
inlineoverrideprivate
template<typename ExpSet >
template<typename Node >
void vcsn::rat::constant_term_visitor< ExpSet >::visit_product ( const Node &  v)
inlineprivate

Visit a variadic node whose constant-term is the product of the constant-terms of its children.

Definition at line 88 of file constant-term.hh.

References vcsn::rat::constant_term_visitor< ExpSet >::constant_term(), vcsn::rat::constant_term_visitor< ExpSet >::res_, and vcsn::rat::constant_term_visitor< ExpSet >::ws_.

Referenced by vcsn::rat::constant_term_visitor< ExpSet >::VCSN_RAT_VISIT().

Here is the call graph for this function:

Member Data Documentation


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