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

virtual 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 (sum, e)
 
 VCSN_RAT_VISIT (prod, e)
 
 VCSN_RAT_VISIT (star, e)
 
 VCSN_RAT_VISIT (lweight, e)
 
 VCSN_RAT_VISIT (rweight, e)
 
void sum_regular (const sum_t &e)
 
void prod_regular (const prod_t &e)
 
void sum_compact (const sum_t &e)
 
void prod_compact (const prod_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 24 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 31 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 33 of file zpc.hh.

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

Definition at line 32 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 318 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 36 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 38 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 76 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 35 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 34 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 44 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 52 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 41 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

Definition at line 57 of file zpc.hh.

References vcsn::detail::all_in(), vcsn::rat::zpc_visitor< Aut, ExpSet >::final_, vcsn::rat::zpc_visitor< Aut, ExpSet >::final_weight_, 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 ( 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 ( sum  ,
 
)
inlineprivate

Definition at line 107 of file zpc.hh.

References vcsn::rat::zpc_visitor< Aut, ExpSet >::compact_, vcsn::rat::zpc_visitor< Aut, ExpSet >::sum_compact(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::sum_regular().

Here is the call graph for this function:

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

Definition at line 115 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 144 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 >
virtual void vcsn::rat::zpc_visitor< Aut, ExpSet >::visit ( const tuple_t ,
std::true_type   
)
inlineoverrideprivatevirtual

Definition at line 77 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 324 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

Definition at line 315 of file zpc.hh.

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


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