Vcsn  2.3
Be Rational
vcsn::rat::star_normal_form_visitor< ExpSet > Class Template Reference

#include <star-normal-form.hh>

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

Public Types

enum  operation_t { dot, box }
 The type of the operator. More...
 
using expressionset_t = ExpSet
 
using expression_t = typename expressionset_t::value_t
 
using context_t = context_t_of< expressionset_t >
 
using weightset_t = weightset_t_of< context_t >
 
using weight_t = typename weightset_t::value_t
 
using super_t = typename ExpSet::const_visitor
 
using tuple_t = typename super_t::tuple_t
 

Public Member Functions

 star_normal_form_visitor (const expressionset_t &rs)
 
expression_t operator() (const expression_t &v)
 
 VCSN_RAT_VISIT (zero,)
 
 VCSN_RAT_VISIT (one,)
 
 VCSN_RAT_VISIT (atom, v)
 
 VCSN_RAT_VISIT (add, v)
 
void visit (const tuple_t &, std::true_type) override
 
 VCSN_RAT_VISIT (mul, v)
 
void box_of (const mul_t &v)
 Handling of a product by the box operator. More...
 
void dot_of (const mul_t &v)
 Handling of a product by the dot operator. More...
 
 VCSN_RAT_VISIT (star, v)
 

Static Public Member Functions

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

Private Attributes

expressionset_t rs_
 
weightset_t ws_ = *rs_.weightset()
 Shorthand to the weightset. More...
 
expression_t res_
 The result. More...
 
operation_t operation_ = dot
 The current operation. More...
 

Detailed Description

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

Template Parameters
ExpSetrelative to the expression.

Implementation based on the dot/box operators as defined in "On the Number of Broken Derived Terms of a Rational Expression", Pierre-Yves Angrand, Sylvain Lombardy, Jacques Sakarovitch.

Definition at line 28 of file star-normal-form.hh.

Member Typedef Documentation

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

Definition at line 34 of file star-normal-form.hh.

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

Definition at line 33 of file star-normal-form.hh.

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

Definition at line 32 of file star-normal-form.hh.

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

Definition at line 41 of file star-normal-form.hh.

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

Definition at line 98 of file star-normal-form.hh.

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

Definition at line 39 of file star-normal-form.hh.

template<typename ExpSet >
using vcsn::rat::star_normal_form_visitor< ExpSet >::weightset_t = weightset_t_of<context_t>

Definition at line 35 of file star-normal-form.hh.

Member Enumeration Documentation

template<typename ExpSet >
enum vcsn::rat::star_normal_form_visitor::operation_t

The type of the operator.

Enumerator
dot 
box 

Definition at line 47 of file star-normal-form.hh.

Constructor & Destructor Documentation

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

Definition at line 49 of file star-normal-form.hh.

Member Function Documentation

template<typename ExpSet >
void vcsn::rat::star_normal_form_visitor< ExpSet >::dot_of ( const mul_t &  v)
inline
template<typename ExpSet >
static constexpr const char* vcsn::rat::star_normal_form_visitor< ExpSet >::me ( )
inlinestatic

Name of this algorithm, for error messages.

Definition at line 44 of file star-normal-form.hh.

Referenced by vcsn::rat::star_normal_form_visitor< ExpSet >::visit().

template<typename ExpSet >
vcsn::rat::star_normal_form_visitor< ExpSet >::VCSN_RAT_VISIT ( zero  )
inline
template<typename ExpSet >
vcsn::rat::star_normal_form_visitor< ExpSet >::VCSN_RAT_VISIT ( atom  ,
v   
)
inline
template<typename ExpSet >
vcsn::rat::star_normal_form_visitor< ExpSet >::VCSN_RAT_VISIT ( add  ,
v   
)
inline
template<typename ExpSet >
vcsn::rat::star_normal_form_visitor< ExpSet >::VCSN_RAT_VISIT ( mul  ,
v   
)
inline

Definition at line 104 of file star-normal-form.hh.

References vcsn::rat::star_normal_form_visitor< ExpSet >::box, vcsn::rat::star_normal_form_visitor< ExpSet >::box_of(), vcsn::rat::star_normal_form_visitor< ExpSet >::dot_of(), vcsn::rat::star_normal_form_visitor< ExpSet >::operation_, and vcsn::v.

Here is the call graph for this function:

template<typename ExpSet >
vcsn::rat::star_normal_form_visitor< ExpSet >::VCSN_RAT_VISIT ( star  ,
v   
)
inline
template<typename ExpSet >
void vcsn::rat::star_normal_form_visitor< ExpSet >::visit ( const tuple_t ,
std::true_type   
)
inlineoverride

Definition at line 99 of file star-normal-form.hh.

References vcsn::rat::star_normal_form_visitor< ExpSet >::me().

Here is the call graph for this function:

Member Data Documentation

template<typename ExpSet >
weightset_t vcsn::rat::star_normal_form_visitor< ExpSet >::ws_ = *rs_.weightset()
private

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