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

Public Member Functions

 star_normal_form_visitor (const expressionset_t &rs)
 
expression_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

expression_t rec_ (const expression_t &v)
 Easy recursion. More...
 
 VCSN_RAT_VISIT (zero,)
 
 VCSN_RAT_VISIT (one,)
 
 VCSN_RAT_VISIT (atom, v)
 
 VCSN_RAT_VISIT (name, 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)
 

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

◆ context_t

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.

◆ expression_t

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.

◆ expressionset_t

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

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

◆ super_t

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.

◆ tuple_t

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

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

◆ weight_t

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.

◆ weightset_t

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

◆ operation_t

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

◆ star_normal_form_visitor()

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

◆ box_of()

◆ dot_of()

template<typename ExpSet >
void vcsn::rat::star_normal_form_visitor< ExpSet >::dot_of ( const mul_t &  v)
inlineprivate

Handling of a product by the dot operator.

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

References vcsn::rat::star_normal_form_visitor< ExpSet >::rec_(), vcsn::res, vcsn::rat::star_normal_form_visitor< ExpSet >::res_, and vcsn::rat::star_normal_form_visitor< ExpSet >::rs_.

Referenced by vcsn::rat::star_normal_form_visitor< ExpSet >::box_of(), and vcsn::rat::star_normal_form_visitor< ExpSet >::VCSN_RAT_VISIT().

Here is the call graph for this function:

◆ me()

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

◆ operator()()

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

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

References vcsn::rat::star_normal_form_visitor< ExpSet >::dot, vcsn::rat::star_normal_form_visitor< ExpSet >::operation_, and vcsn::rat::star_normal_form_visitor< ExpSet >::rec_().

Here is the call graph for this function:

◆ rec_()

◆ VCSN_RAT_VISIT() [1/7]

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

◆ VCSN_RAT_VISIT() [2/7]

◆ VCSN_RAT_VISIT() [3/7]

template<typename ExpSet >
vcsn::rat::star_normal_form_visitor< ExpSet >::VCSN_RAT_VISIT ( atom  ,
v   
)
inlineprivate

◆ VCSN_RAT_VISIT() [4/7]

template<typename ExpSet >
vcsn::rat::star_normal_form_visitor< ExpSet >::VCSN_RAT_VISIT ( name  ,
v   
)
inlineprivate

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

References vcsn::rat::star_normal_form_visitor< ExpSet >::rec_(), vcsn::rat::star_normal_form_visitor< ExpSet >::res_, vcsn::rat::star_normal_form_visitor< ExpSet >::rs_, and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [5/7]

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

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

References vcsn::rat::star_normal_form_visitor< ExpSet >::rec_(), vcsn::res, vcsn::rat::star_normal_form_visitor< ExpSet >::res_, vcsn::rat::star_normal_form_visitor< ExpSet >::rs_, vcsn::v, and VCSN_RAT_UNSUPPORTED.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [6/7]

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

Definition at line 112 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:

◆ VCSN_RAT_VISIT() [7/7]

◆ visit()

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

Definition at line 107 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

◆ operation_

◆ res_

◆ rs_

◆ ws_

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: