![]() |
Vcsn
2.3a
Be Rational
|
Build a ZPC automaton from an expression. More...
#include <zpc.hh>
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 char * | me () |
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_t & | rs_ |
const weightset_t & | ws_ = *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... | |
Build a ZPC automaton from an expression.
Aut | relative the generated automaton. |
ExpSet | relative to the expression. |
using vcsn::rat::zpc_visitor< Aut, ExpSet >::automaton_t = Aut |
using vcsn::rat::zpc_visitor< Aut, ExpSet >::context_t = context_t_of<automaton_t> |
using vcsn::rat::zpc_visitor< Aut, ExpSet >::expressionset_t = ExpSet |
|
private |
using vcsn::rat::zpc_visitor< Aut, ExpSet >::state_t = state_t_of<automaton_t> |
using vcsn::rat::zpc_visitor< Aut, ExpSet >::super_t = typename expressionset_t::const_visitor |
|
private |
using vcsn::rat::zpc_visitor< Aut, ExpSet >::weight_t = weight_t_of<expressionset_t> |
using vcsn::rat::zpc_visitor< Aut, ExpSet >::weightset_t = weightset_t_of<expressionset_t> |
|
inline |
|
inline |
|
inlineprivate |
Definition at line 259 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::epsilon_, vcsn::rat::zpc_visitor< Aut, ExpSet >::final_, vcsn::rat::zpc_visitor< Aut, ExpSet >::initial_, vcsn::rat::zpc_visitor< Aut, ExpSet >::res_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::ws_.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
inlineprivate |
Definition at line 170 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::epsilon_, vcsn::rat::zpc_visitor< Aut, ExpSet >::final_, vcsn::rat::zpc_visitor< Aut, ExpSet >::initial_, vcsn::rat::zpc_visitor< Aut, ExpSet >::res_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::ws_.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
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().
|
inline |
Definition at line 58 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_, vcsn::rat::zpc_visitor< Aut, ExpSet >::rs_, vcsn::rat::to_string(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::ws_.
|
inlineprivate |
Definition at line 288 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::epsilon_, vcsn::rat::zpc_visitor< Aut, ExpSet >::final_, vcsn::rat::zpc_visitor< Aut, ExpSet >::initial_, vcsn::rat::zpc_visitor< Aut, ExpSet >::res_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::ws_.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
inlineprivate |
Definition at line 199 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::epsilon_, vcsn::rat::zpc_visitor< Aut, ExpSet >::final_, vcsn::rat::zpc_visitor< Aut, ExpSet >::initial_, vcsn::rat::zpc_visitor< Aut, ExpSet >::res_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::ws_.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
inlineprivate |
Definition at line 92 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::final_, vcsn::rat::zpc_visitor< Aut, ExpSet >::initial_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::res_.
|
inlineprivate |
Definition at line 98 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::final_, vcsn::rat::zpc_visitor< Aut, ExpSet >::initial_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::res_.
|
inlineprivate |
Definition at line 106 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::final_, vcsn::rat::zpc_visitor< Aut, ExpSet >::initial_, vcsn::rat::zpc_visitor< Aut, ExpSet >::res_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::rs_.
|
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_.
|
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().
|
inlineprivate |
|
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_.
|
inlineprivate |
Definition at line 163 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::final_weight_, and vcsn::rat::zpc_visitor< Aut, ExpSet >::ws_.
|
inlineoverrideprivate |
Definition at line 87 of file zpc.hh.
References vcsn::rat::zpc_visitor< Aut, ExpSet >::me().
|
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().
|
private |
Definition at line 329 of file zpc.hh.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::add_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::add_regular(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_regular(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 331 of file zpc.hh.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::add_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::add_regular(), vcsn::rat::zpc_visitor< Aut, ExpSet >::operator()(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_regular(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 332 of file zpc.hh.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::operator()(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 330 of file zpc.hh.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::add_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::add_regular(), vcsn::rat::zpc_visitor< Aut, ExpSet >::operator()(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_regular(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 327 of file zpc.hh.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::add_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::add_regular(), vcsn::rat::zpc_visitor< Aut, ExpSet >::operator()(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_regular(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 325 of file zpc.hh.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::operator()(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().
|
private |
Definition at line 326 of file zpc.hh.
Referenced by vcsn::rat::zpc_visitor< Aut, ExpSet >::add_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::add_regular(), vcsn::rat::zpc_visitor< Aut, ExpSet >::operator()(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_compact(), vcsn::rat::zpc_visitor< Aut, ExpSet >::prod_regular(), and vcsn::rat::zpc_visitor< Aut, ExpSet >::VCSN_RAT_VISIT().