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

Functor to compute the size of a rational expression. More...

#include <size.hh>

Inheritance diagram for vcsn::rat::sizer< ExpSet >:
Collaboration diagram for vcsn::rat::sizer< 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 context_t = context_t_of< expressionset_t >
 
using weight_t = typename context_t::weightset_t::value_t
 
using node_t = typename super_t::node_t
 
using inner_t = typename super_t::inner_t
 
template<type_t Type>
using unary_t = typename super_t::template unary_t< Type >
 
template<type_t Type>
using variadic_t = typename super_t::template variadic_t< Type >
 
using leaf_t = typename super_t::leaf_t
 

Public Member Functions

size_t operator() (const node_t &v)
 Entry point: return the size of v. More...
 
size_t operator() (const std::shared_ptr< const node_t > &v)
 Entry point: return the size of v. More...
 

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

 VCSN_RAT_VISIT (atom,)
 
 VCSN_RAT_VISIT (complement, v)
 
 VCSN_RAT_VISIT (conjunction, v)
 
 VCSN_RAT_VISIT (infiltration, v)
 
 VCSN_RAT_VISIT (ldiv, v)
 
 VCSN_RAT_VISIT (lweight, v)
 
 VCSN_RAT_VISIT (one,)
 
 VCSN_RAT_VISIT (prod, v)
 
 VCSN_RAT_VISIT (rweight, v)
 
 VCSN_RAT_VISIT (shuffle, v)
 
 VCSN_RAT_VISIT (star, v)
 
 VCSN_RAT_VISIT (sum, v)
 
 VCSN_RAT_VISIT (transposition, v)
 
 VCSN_RAT_VISIT (zero,)
 
void visit (const tuple_t &v, std::true_type) override
 
template<rat::exp::type_t Type>
void visit_unary (const unary_t< Type > &v)
 Traverse unary node. More...
 
template<rat::exp::type_t Type>
void visit_variadic (const variadic_t< Type > &v)
 Traverse variadic node. More...
 

Private Attributes

size_t size_
 

Detailed Description

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

Functor to compute the size of a rational expression.

Template Parameters
ExpSetthe expressionset type.

Definition at line 15 of file size.hh.

Member Typedef Documentation

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

Definition at line 22 of file size.hh.

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

Definition at line 19 of file size.hh.

template<typename ExpSet >
using vcsn::rat::sizer< ExpSet >::inner_t = typename super_t::inner_t

Definition at line 25 of file size.hh.

template<typename ExpSet >
using vcsn::rat::sizer< ExpSet >::leaf_t = typename super_t::leaf_t

Definition at line 30 of file size.hh.

template<typename ExpSet >
using vcsn::rat::sizer< ExpSet >::node_t = typename super_t::node_t

Definition at line 24 of file size.hh.

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

Definition at line 20 of file size.hh.

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

Definition at line 68 of file size.hh.

template<typename ExpSet >
template<type_t Type>
using vcsn::rat::sizer< ExpSet >::unary_t = typename super_t::template unary_t<Type>

Definition at line 27 of file size.hh.

template<typename ExpSet >
template<type_t Type>
using vcsn::rat::sizer< ExpSet >::variadic_t = typename super_t::template variadic_t<Type>

Definition at line 29 of file size.hh.

template<typename ExpSet >
using vcsn::rat::sizer< ExpSet >::weight_t = typename context_t::weightset_t::value_t

Definition at line 23 of file size.hh.

Member Function Documentation

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

Name of this algorithm, for error messages.

Definition at line 33 of file size.hh.

template<typename ExpSet >
size_t vcsn::rat::sizer< ExpSet >::operator() ( const node_t v)
inline

Entry point: return the size of v.

Definition at line 37 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_.

Referenced by vcsn::rat::sizer< ExpSet >::operator()().

template<typename ExpSet >
size_t vcsn::rat::sizer< ExpSet >::operator() ( const std::shared_ptr< const node_t > &  v)
inline

Entry point: return the size of v.

Definition at line 46 of file size.hh.

References vcsn::rat::sizer< ExpSet >::operator()().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::sizer< ExpSet >::VCSN_RAT_VISIT ( atom  )
inlineprivate

Definition at line 53 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_.

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

Definition at line 54 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_unary().

Here is the call graph for this function:

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

Definition at line 55 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_variadic().

Here is the call graph for this function:

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

Definition at line 56 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_variadic().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::sizer< ExpSet >::VCSN_RAT_VISIT ( ldiv  ,
 
)
inlineprivate

Definition at line 57 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_variadic().

Here is the call graph for this function:

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

Definition at line 58 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_, and vcsn::detail::v.

template<typename ExpSet >
vcsn::rat::sizer< ExpSet >::VCSN_RAT_VISIT ( one  )
inlineprivate

Definition at line 59 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_.

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

Definition at line 60 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_variadic().

Here is the call graph for this function:

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

Definition at line 61 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_, and vcsn::detail::v.

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

Definition at line 62 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_variadic().

Here is the call graph for this function:

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

Definition at line 63 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_unary().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::sizer< ExpSet >::VCSN_RAT_VISIT ( sum  ,
 
)
inlineprivate

Definition at line 64 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_variadic().

Here is the call graph for this function:

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

Definition at line 65 of file size.hh.

References vcsn::detail::v, and vcsn::rat::sizer< ExpSet >::visit_unary().

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::sizer< ExpSet >::VCSN_RAT_VISIT ( zero  )
inlineprivate

Definition at line 66 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_.

template<typename ExpSet >
void vcsn::rat::sizer< ExpSet >::visit ( const tuple_t v,
std::true_type   
)
inlineoverrideprivate

Definition at line 111 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_, and vcsn::detail::v.

template<typename ExpSet >
template<rat::exp::type_t Type>
void vcsn::rat::sizer< ExpSet >::visit_unary ( const unary_t< Type > &  v)
inlineprivate

Traverse unary node.

Definition at line 118 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_.

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

template<typename ExpSet >
template<rat::exp::type_t Type>
void vcsn::rat::sizer< ExpSet >::visit_variadic ( const variadic_t< Type > &  v)
inlineprivate

Traverse variadic node.

Definition at line 126 of file size.hh.

References vcsn::rat::sizer< ExpSet >::size_.

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

Member Data Documentation


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