Vcsn  2.8
Be Rational
vcsn::rat::standard_visitor< Aut, ExpSet > Class Template Reference

Build a standard automaton from an expression. More...

#include <standard.hh>

Inheritance diagram for vcsn::rat::standard_visitor< Aut, ExpSet >:
Collaboration diagram for vcsn::rat::standard_visitor< Aut, ExpSet >:

Public Types

using automaton_t = Aut
 
using expressionset_t = ExpSet
 
using expression_t = typename expressionset_t::value_t
 
using weightset_t = weightset_t_of< expressionset_t >
 
using weight_t = weight_t_of< expressionset_t >
 
using state_t = state_t_of< automaton_t >
 
using super_t = typename expressionset_t::const_visitor
 

Public Member Functions

 standard_visitor (const expressionset_t &rs)
 
automaton_t operator() (const expression_t &v)
 The standard automaton 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
 
using states_t = std::set< state_t >
 The current set of final states. More...
 

Private Member Functions

void visit (const tuple_t &, std::true_type) override
 
 VCSN_RAT_VISIT (zero,)
 
 VCSN_RAT_VISIT (one,)
 
 VCSN_RAT_VISIT (atom, e)
 
 VCSN_RAT_VISIT (name, e)
 
states_t finals () const
 
 VCSN_RAT_VISIT (add, e)
 
 VCSN_RAT_VISIT (mul, e)
 
 VCSN_RAT_VISIT (star, e)
 
 VCSN_RAT_VISIT (lweight, e)
 
 VCSN_RAT_VISIT (rweight, e)
 

Private Attributes

const expressionset_trs_
 
const weightset_tws_ = *rs_.weightset()
 
automaton_t res_
 
state_t initial_ = automaton_t::element_type::null_state()
 

Detailed Description

template<Automaton Aut, typename ExpSet>
class vcsn::rat::standard_visitor< Aut, ExpSet >

Build a standard automaton from an expression.

Template Parameters
Autrelative the generated automaton
ExpSetrelative to the expression.

Definition at line 169 of file standard.hh.

Member Typedef Documentation

◆ automaton_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::automaton_t = Aut

Definition at line 173 of file standard.hh.

◆ expression_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::expression_t = typename expressionset_t::value_t

Definition at line 175 of file standard.hh.

◆ expressionset_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::expressionset_t = ExpSet

Definition at line 174 of file standard.hh.

◆ state_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::state_t = state_t_of<automaton_t>

Definition at line 178 of file standard.hh.

◆ states_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::states_t = std::set<state_t>
private

The current set of final states.

Definition at line 248 of file standard.hh.

◆ super_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::super_t = typename expressionset_t::const_visitor

Definition at line 180 of file standard.hh.

◆ tuple_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::tuple_t = typename super_t::tuple_t
private

Definition at line 215 of file standard.hh.

◆ weight_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::weight_t = weight_t_of<expressionset_t>

Definition at line 177 of file standard.hh.

◆ weightset_t

template<Automaton Aut, typename ExpSet >
using vcsn::rat::standard_visitor< Aut, ExpSet >::weightset_t = weightset_t_of<expressionset_t>

Definition at line 176 of file standard.hh.

Constructor & Destructor Documentation

◆ standard_visitor()

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::standard_visitor ( const expressionset_t rs)
inline

Definition at line 185 of file standard.hh.

Member Function Documentation

◆ finals()

template<Automaton Aut, typename ExpSet >
states_t vcsn::rat::standard_visitor< Aut, ExpSet >::finals ( ) const
inlineprivate

Definition at line 249 of file standard.hh.

References vcsn::detail::final_transitions(), and vcsn::res.

Here is the call graph for this function:

◆ me()

template<Automaton Aut, typename ExpSet >
static constexpr const char* vcsn::rat::standard_visitor< Aut, ExpSet >::me ( )
inlinestatic

Name of this algorithm, for error messages.

Definition at line 183 of file standard.hh.

◆ operator()()

template<Automaton Aut, typename ExpSet >
automaton_t vcsn::rat::standard_visitor< Aut, ExpSet >::operator() ( const expression_t v)
inline

The standard automaton of v.

Definition at line 191 of file standard.hh.

References vcsn::to_string(), and VCSN_RAT_UNSUPPORTED.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [1/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( zero  )
inlineprivate

Definition at line 221 of file standard.hh.

◆ VCSN_RAT_VISIT() [2/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( one  )
inlineprivate

Definition at line 226 of file standard.hh.

◆ VCSN_RAT_VISIT() [3/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( atom  ,
 
)
inlineprivate

Definition at line 233 of file standard.hh.

◆ VCSN_RAT_VISIT() [4/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( name  ,
 
)
inlineprivate

Definition at line 242 of file standard.hh.

◆ VCSN_RAT_VISIT() [5/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( add  ,
 
)
inlineprivate

Definition at line 257 of file standard.hh.

References vcsn::detail::all_out().

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [6/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( mul  ,
 
)
inlineprivate

Definition at line 277 of file standard.hh.

References vcsn::detail::all_out(), vcsn::detail::final_transitions(), vcsn::has(), and vcsn::detail::make_vector().

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [7/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( star  ,
 
)
inlineprivate

Definition at line 329 of file standard.hh.

References vcsn::detail::final_transitions(), vcsn::has(), and vcsn::detail::out().

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [8/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( lweight  ,
 
)
inlineprivate

Definition at line 359 of file standard.hh.

References vcsn::detail::all_out().

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [9/9]

template<Automaton Aut, typename ExpSet >
vcsn::rat::standard_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( rweight  ,
 
)
inlineprivate

Definition at line 366 of file standard.hh.

References vcsn::detail::final_transitions(), and vcsn::has().

Here is the call graph for this function:

◆ visit()

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

Definition at line 216 of file standard.hh.

Member Data Documentation

◆ initial_

template<Automaton Aut, typename ExpSet >
state_t vcsn::rat::standard_visitor< Aut, ExpSet >::initial_ = automaton_t::element_type::null_state()
private

Definition at line 379 of file standard.hh.

◆ res_

template<Automaton Aut, typename ExpSet >
automaton_t vcsn::rat::standard_visitor< Aut, ExpSet >::res_
private

Definition at line 378 of file standard.hh.

◆ rs_

template<Automaton Aut, typename ExpSet >
const expressionset_t& vcsn::rat::standard_visitor< Aut, ExpSet >::rs_
private

Definition at line 376 of file standard.hh.

◆ ws_

template<Automaton Aut, typename ExpSet >
const weightset_t& vcsn::rat::standard_visitor< Aut, ExpSet >::ws_ = *rs_.weightset()
private

Definition at line 377 of file standard.hh.


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