Vcsn  2.4
Be Rational
vcsn::rat::zpc_visitor< Aut, ExpSet > Class Template Reference

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

#include <zpc.hh>

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

Public Types

using automaton_t = Aut
 
using expressionset_t = ExpSet
 
using context_t = context_t_of< automaton_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

 zpc_visitor (const context_t &ctx, const expressionset_t &rs, bool compact)
 Build an automaton of context ctx. More...
 
 zpc_visitor (const expressionset_t &rs, bool compact)
 
automaton_t operator() (const typename expressionset_t::value_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
 
using label_t = label_t_of< automaton_t >
 

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 (add, e)
 
 VCSN_RAT_VISIT (mul, e)
 
 VCSN_RAT_VISIT (star, e)
 
 VCSN_RAT_VISIT (lweight, e)
 
 VCSN_RAT_VISIT (rweight, e)
 
void add_regular (const add_t &e)
 
void prod_regular (const mul_t &e)
 
void add_compact (const add_t &e)
 
void prod_compact (const mul_t &e)
 

Private Attributes

const expressionset_trs_
 
const weightset_tws_ = *rs_.weightset()
 
automaton_t res_
 
const label_t epsilon_ = res_->labelset()->one()
 
state_t initial_ = automaton_t::element_type::null_state()
 
state_t final_ = automaton_t::element_type::null_state()
 
weight_t final_weight_ = ws_.one()
 
const bool compact_
 Whether to build the "compact" version of the ZPC automaton. More...
 

Detailed Description

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

Build a ZPC automaton from an expression.

Template Parameters
Autrelative the generated automaton.
ExpSetrelative to the expression.

Definition at line 25 of file zpc.hh.

Member Typedef Documentation

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

Definition at line 32 of file zpc.hh.

template<Automaton Aut, typename ExpSet >
using vcsn::rat::zpc_visitor< Aut, ExpSet >::context_t = context_t_of<automaton_t>

Definition at line 34 of file zpc.hh.

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

Definition at line 33 of file zpc.hh.

template<Automaton Aut, typename ExpSet >
using vcsn::rat::zpc_visitor< Aut, ExpSet >::label_t = label_t_of<automaton_t>
private

Definition at line 328 of file zpc.hh.

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

Definition at line 37 of file zpc.hh.

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

Definition at line 39 of file zpc.hh.

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

Definition at line 86 of file zpc.hh.

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

Definition at line 36 of file zpc.hh.

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

Definition at line 35 of file zpc.hh.

Constructor & Destructor Documentation

template<Automaton Aut, typename ExpSet >
vcsn::rat::zpc_visitor< Aut, ExpSet >::zpc_visitor ( const context_t ctx,
const expressionset_t rs,
bool  compact 
)
inline

Build an automaton of context ctx.

Definition at line 45 of file zpc.hh.

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

Definition at line 53 of file zpc.hh.

Member Function Documentation

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

Name of this algorithm, for error messages.

Definition at line 42 of file zpc.hh.

Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::visit().

template<Automaton Aut, typename ExpSet >
automaton_t vcsn::rat::zpc_visitor< Aut, ExpSet >::operator() ( const typename expressionset_t::value_t &  v)
inline
template<Automaton Aut, typename ExpSet >
vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( zero  )
inlineprivate
template<Automaton Aut, typename ExpSet >
vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( one  )
inlineprivate
template<Automaton Aut, typename ExpSet >
vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( atom  ,
 
)
inlineprivate
template<Automaton Aut, typename ExpSet >
vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT ( add  ,
 
)
inlineprivate

Definition at line 117 of file zpc.hh.

References vcsn::rat::zpc_visitor< Aut, ExpSet >::add_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::add_regular(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::compact_.

Here is the call graph for this function:

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

Definition at line 125 of file zpc.hh.

References vcsn::rat::zpc_visitor< Aut, ExpSet >::compact_, vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_compact(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_regular().

Here is the call graph for this function:

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

Definition at line 154 of file zpc.hh.

References vcsn::detail::all_out(), vcsn::rat::zpc_visitor< Aut, ExpSet >::initial_, vcsn::rat::zpc_visitor< Aut, ExpSet >::res_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::ws_.

Here is the call graph for this function:

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

Definition at line 87 of file zpc.hh.

References vcsn::rat::zpc_visitor< Aut, ExpSet >::me().

Here is the call graph for this function:

Member Data Documentation

template<Automaton Aut, typename ExpSet >
const bool vcsn::rat::zpc_visitor< Aut, ExpSet >::compact_
private

Whether to build the "compact" version of the ZPC automaton.

Definition at line 334 of file zpc.hh.

Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().

template<Automaton Aut, typename ExpSet >
weight_t vcsn::rat::zpc_visitor< Aut, ExpSet >::final_weight_ = ws_.one()
private
template<Automaton Aut, typename ExpSet >
const expressionset_t& vcsn::rat::zpc_visitor< Aut, ExpSet >::rs_
private

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