Vcsn  2.4
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
 

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
 Actual node, without indirection. More...
 
using expression_t = typename node_t::value_t
 A shared_ptr to node_t. More...
 
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 expression_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 (add, v)
 
 VCSN_RAT_VISIT (atom,)
 
 VCSN_RAT_VISIT (complement, v)
 
 VCSN_RAT_VISIT (compose, v)
 
 VCSN_RAT_VISIT (conjunction, v)
 
 VCSN_RAT_VISIT (infiltrate, v)
 
 VCSN_RAT_VISIT (ldivide, v)
 
 VCSN_RAT_VISIT (lweight, v)
 
 VCSN_RAT_VISIT (mul, v)
 
 VCSN_RAT_VISIT (one,)
 
 VCSN_RAT_VISIT (rweight, v)
 
 VCSN_RAT_VISIT (shuffle, v)
 
 VCSN_RAT_VISIT (star, 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_ (const unary_t< Type > &v)
 Traverse unary node. More...
 
template<rat::exp::type_t Type>
void visit_ (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 >::expression_t = typename node_t::value_t

A shared_ptr to node_t.

Definition at line 27 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 29 of file size.hh.

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

Definition at line 34 of file size.hh.

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

Actual node, without indirection.

Definition at line 25 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 66 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 31 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 33 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 37 of file size.hh.

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

Entry point: return the size of v.

Definition at line 41 of file size.hh.

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

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

Definition at line 50 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 51 of file size.hh.

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

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

Definition at line 52 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 53 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 54 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 55 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 56 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 57 of file size.hh.

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

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

Definition at line 58 of file size.hh.

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

Here is the call graph for this function:

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 ( rweight  ,
v   
)
inlineprivate

Definition at line 60 of file size.hh.

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

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

Definition at line 61 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 62 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 63 of file size.hh.

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

Here is the call graph for this function:

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

Definition at line 64 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 99 of file size.hh.

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

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

Traverse unary node.

Definition at line 108 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_ ( const variadic_t< Type > &  v)
inlineprivate

Traverse variadic node.

Definition at line 116 of file size.hh.

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

Member Data Documentation


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