![]() |
Vcsn
2.3a
Be Rational
|
The subset construction automaton from another. More...
#include <determinize.hh>
Public Types | |
using | automaton_t = Aut |
using | super_t = automaton_decorator< polystate_automaton< automaton_t, kind, Lazy >> |
using | self_t = determinized_automaton_impl |
using | context_t = context_t_of< automaton_t > |
Labels and weights. More... | |
using | labelset_t = labelset_t_of< automaton_t > |
using | label_t = label_t_of< automaton_t > |
using | weightset_t = weightset_t_of< automaton_t > |
using | weight_t = weight_t_of< automaton_t > |
using | stateset_t = stateset< automaton_t > |
State index. More... | |
using | state_t = state_t_of< automaton_t > |
using | state_name_t = typename super_t::element_type::state_name_t |
The state name: set of (input) states. More... | |
![]() | |
using | automaton_t = Aut |
The type of automaton to wrap. More... | |
using | context_t = context_t_of< Aut > |
using | element_type = typename automaton_t::element_type |
The automaton type, without shared_ptr. More... | |
using | fresh_automaton_t = typename element_type::template fresh_automaton_t< Ctx > |
The (shared pointer) type to use it we have to create an automaton of the same (underlying) type. More... | |
using | kind_t = typename context_t::kind_t |
using | labelset_t = typename context_t::labelset_t |
using | labelset_ptr = typename context_t::labelset_ptr |
using | label_t = typename labelset_t::value_t |
using | weightset_t = typename context_t::weightset_t |
using | weightset_ptr = typename context_t::weightset_ptr |
using | weight_t = typename weightset_t::value_t |
using | state_t = state_t_of< automaton_t > |
using | transition_t = transition_t_of< automaton_t > |
Public Member Functions | |
auto | strip () const |
auto | origins () const |
determinized_automaton_impl (const automaton_t &a) | |
Build the determinizer. More... | |
std::ostream & | print_set (std::ostream &o, format fmt={}) const |
void | operator() () |
Determinize the automaton. More... | |
auto | all_out (state_t s) const -> decltype(all_out(aut_, s)) |
All the outgoing transitions. More... | |
![]() | |
automaton_decorator (automaton_t aut) | |
automaton_decorator (const automaton_decorator &aut) | |
automaton_decorator (const context_t &ctx) | |
automaton_decorator (automaton_decorator &&aut) | |
automaton_decorator & | operator= (automaton_decorator &&that) |
automaton_t | strip () |
The automaton we decorate. More... | |
auto | all_in (Args &&...args) const -> decltype(aut_-> all_in(std::forward< Args >(args)...)) |
auto | all_out (Args &&...args) const -> decltype(aut_-> all_out(std::forward< Args >(args)...)) |
auto | all_states (Args &&...args) const -> decltype(aut_-> all_states(std::forward< Args >(args)...)) |
auto | all_transitions (Args &&...args) const -> decltype(aut_-> all_transitions(std::forward< Args >(args)...)) |
auto | context (Args &&...args) const -> decltype(aut_-> context(std::forward< Args >(args)...)) |
auto | dst_of (Args &&...args) const -> decltype(aut_-> dst_of(std::forward< Args >(args)...)) |
auto | get_final_weight (Args &&...args) const -> decltype(aut_-> get_ final _weight(std |
auto | get_initial_weight (Args &&...args) const -> decltype(aut_-> get_initial_weight(std::forward< Args >(args)...)) |
auto | get_transition (Args &&...args) const -> decltype(aut_-> get_transition(std::forward< Args >(args)...)) |
auto | has_state (Args &&...args) const -> decltype(aut_-> has_state(std::forward< Args >(args)...)) |
auto | has_transition (Args &&...args) const -> decltype(aut_-> has_transition(std::forward< Args >(args)...)) |
auto | is_final (Args &&...args) const -> decltype(aut_-> is_ final(std |
auto | is_initial (Args &&...args) const -> decltype(aut_-> is_initial(std::forward< Args >(args)...)) |
auto | label_of (Args &&...args) const -> decltype(aut_-> label_of(std::forward< Args >(args)...)) |
auto | labelset (Args &&...args) const -> decltype(aut_-> labelset(std::forward< Args >(args)...)) |
auto | num_all_states (Args &&...args) const -> decltype(aut_-> num_all_states(std::forward< Args >(args)...)) |
auto | num_finals (Args &&...args) const -> decltype(aut_-> num_ final s(std |
auto | num_initials (Args &&...args) const -> decltype(aut_-> num_initials(std::forward< Args >(args)...)) |
auto | num_states (Args &&...args) const -> decltype(aut_-> num_states(std::forward< Args >(args)...)) |
auto | num_transitions (Args &&...args) const -> decltype(aut_-> num_transitions(std::forward< Args >(args)...)) |
auto | prepost_label (Args &&...args) const -> decltype(aut_-> prepost_label(std::forward< Args >(args)...)) |
auto | print (Args &&...args) const -> decltype(aut_-> print(std::forward< Args >(args)...)) |
auto | print_set (Args &&...args) const -> decltype(aut_-> print_set(std::forward< Args >(args)...)) |
auto | print_state (Args &&...args) const -> decltype(aut_-> print_state(std::forward< Args >(args)...)) |
auto | print_state_name (Args &&...args) const -> decltype(aut_-> print_state_name(std::forward< Args >(args)...)) |
auto | src_of (Args &&...args) const -> decltype(aut_-> src_of(std::forward< Args >(args)...)) |
auto | state_has_name (Args &&...args) const -> decltype(aut_-> state_has_name(std::forward< Args >(args)...)) |
auto | is_lazy (Args &&...args) const -> decltype(aut_-> is_lazy(std::forward< Args >(args)...)) |
auto | is_lazy_in (Args &&...args) const -> decltype(aut_-> is_lazy_in(std::forward< Args >(args)...)) |
auto | states (Args &&...args) const -> decltype(aut_-> states(std::forward< Args >(args)...)) |
auto | weight_of (Args &&...args) const -> decltype(aut_-> weight_of(std::forward< Args >(args)...)) |
auto | weightset (Args &&...args) const -> decltype(aut_-> weightset(std::forward< Args >(args)...)) |
auto | add_final (Args &&...args) -> decltype(aut_-> add_ final(std |
auto | add_initial (Args &&...args) -> decltype(aut_-> add_initial(std::forward< Args >(args)...)) |
auto | add_transition (Args &&...args) -> decltype(aut_-> add_transition(std::forward< Args >(args)...)) |
auto | add_transition_copy (Args &&...args) -> decltype(aut_-> add_transition_copy(std::forward< Args >(args)...)) |
auto | add_weight (Args &&...args) -> decltype(aut_-> add_weight(std::forward< Args >(args)...)) |
auto | del_state (Args &&...args) -> decltype(aut_-> del_state(std::forward< Args >(args)...)) |
auto | del_transition (Args &&...args) -> decltype(aut_-> del_transition(std::forward< Args >(args)...)) |
auto | lweight (Args &&...args) -> decltype(aut_-> lweight(std::forward< Args >(args)...)) |
auto | new_state (Args &&...args) -> decltype(aut_-> new_state(std::forward< Args >(args)...)) |
auto | new_transition (Args &&...args) -> decltype(aut_-> new_transition(std::forward< Args >(args)...)) |
auto | new_transition_copy (Args &&...args) -> decltype(aut_-> new_transition_copy(std::forward< Args >(args)...)) |
auto | rweight (Args &&...args) -> decltype(aut_-> rweight(std::forward< Args >(args)...)) |
auto | set_final (Args &&...args) -> decltype(aut_-> set_ final(std |
auto | set_lazy (Args &&...args) -> decltype(aut_-> set_lazy(std::forward< Args >(args)...)) |
auto | set_lazy_in (Args &&...args) -> decltype(aut_-> set_lazy_in(std::forward< Args >(args)...)) |
auto | set_initial (Args &&...args) -> decltype(aut_-> set_initial(std::forward< Args >(args)...)) |
auto | set_transition (Args &&...args) -> decltype(aut_-> set_transition(std::forward< Args >(args)...)) |
auto | set_weight (Args &&...args) -> decltype(aut_-> set_weight(std::forward< Args >(args)...)) |
auto | unset_final (Args &&...args) -> decltype(aut_-> unset_ final(std |
auto | unset_initial (Args &&...args) -> decltype(aut_-> unset_initial(std::forward< Args >(args)...)) |
Static Public Member Functions | |
static symbol | sname () |
![]() | |
static constexpr auto | lazy_transition (Args &&...args) -> decltype(element_type::lazy_transition(std::forward< Args >(args)...)) |
static constexpr auto | null_state (Args &&...args) -> decltype(element_type::null_state(std::forward< Args >(args)...)) |
static constexpr auto | null_transition (Args &&...args) -> decltype(element_type::null_transition(std::forward< Args >(args)...)) |
static constexpr auto | post (Args &&...args) -> decltype(element_type::post(std::forward< Args >(args)...)) |
static constexpr auto | pre (Args &&...args) -> decltype(element_type::pre(std::forward< Args >(args)...)) |
static constexpr auto | sname (Args &&...args) -> decltype(element_type::sname(std::forward< Args >(args)...)) |
Static Public Attributes | |
static constexpr wet_kind_t | kind = Kind |
Private Types | |
using | label_map_t = std::unordered_map< label_t, state_name_t, vcsn::hash< labelset_t >, vcsn::equal_to< labelset_t >> |
successors[SOURCE-STATE][LABEL] = DEST-STATESET. More... | |
using | successors_t = std::map< state_t, label_map_t > |
Private Member Functions | |
void | complete_ (state_t s) const |
Complete a state: find its outgoing transitions. More... | |
template<wet_kind_t K = kind> | |
auto | complete_ (state_t src, const state_name_t &ss) -> std::enable_if_t< K==wet_kind_t::bitset > |
Compute the outgoing transitions of this state. More... | |
template<wet_kind_t K = kind> | |
auto | complete_ (state_t src, const state_name_t &ss) -> std::enable_if_t< K!=wet_kind_t::bitset > |
Compute the outgoing transitions of this state. More... | |
Private Attributes | |
state_name_t | finals_ = aut_->zero() |
Set of final states in the input automaton. More... | |
successors_t | successors_ |
Additional Inherited Members | |
![]() | |
automaton_t | aut_ |
The wrapped automaton, possibly const. More... | |
The subset construction automaton from another.
Aut | the input automaton type. |
Definition at line 31 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::automaton_t = Aut |
Definition at line 38 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::context_t = context_t_of<automaton_t> |
Labels and weights.
Definition at line 45 of file determinize.hh.
|
private |
successors[SOURCE-STATE][LABEL] = DEST-STATESET.
Definition at line 234 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::label_t = label_t_of<automaton_t> |
Definition at line 47 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::labelset_t = labelset_t_of<automaton_t> |
Definition at line 46 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::self_t = determinized_automaton_impl |
Definition at line 42 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::state_name_t = typename super_t::element_type::state_name_t |
The state name: set of (input) states.
Definition at line 56 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::state_t = state_t_of<automaton_t> |
Definition at line 53 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::stateset_t = stateset<automaton_t> |
State index.
Definition at line 52 of file determinize.hh.
|
private |
Definition at line 235 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::super_t = automaton_decorator<polystate_automaton<automaton_t, kind, Lazy>> |
Definition at line 41 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::weight_t = weight_t_of<automaton_t> |
Definition at line 49 of file determinize.hh.
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::weightset_t = weightset_t_of<automaton_t> |
Definition at line 48 of file determinize.hh.
|
inline |
Build the determinizer.
a | the automaton to determinize |
Definition at line 70 of file determinize.hh.
References vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::aut_, vcsn::detail::final_transitions(), and vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::finals_.
|
inline |
All the outgoing transitions.
Definition at line 112 of file determinize.hh.
References vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::aut_, and vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_().
|
inlineprivate |
Complete a state: find its outgoing transitions.
Definition at line 122 of file determinize.hh.
References vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_(), and vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::origins().
Referenced by vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::all_out(), vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_(), and vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::operator()().
|
inlineprivate |
Compute the outgoing transitions of this state.
Definition at line 131 of file determinize.hh.
References vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::aut_, vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::finals_, vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::label_of(), vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::new_transition(), vcsn::detail::out(), vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::set_final(), and vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::successors_.
|
inlineprivate |
Compute the outgoing transitions of this state.
Definition at line 186 of file determinize.hh.
References vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::aut_, vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::finals_, vcsn::has(), vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::label_of(), vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::new_transition(), vcsn::detail::out(), vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::set_final(), vcsn::detail::v, and vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::weight_of().
|
inline |
Determinize the automaton.
Definition at line 100 of file determinize.hh.
References vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::aut_, and vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_().
|
inline |
Definition at line 63 of file determinize.hh.
References vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::aut_.
Referenced by vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_().
|
inline |
Definition at line 90 of file determinize.hh.
|
inlinestatic |
Definition at line 80 of file determinize.hh.
References vcsn::res, vcsn::sname(), and vcsn::to_string().
|
inline |
Definition at line 59 of file determinize.hh.
References vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >::aut_.
|
private |
Set of final states in the input automaton.
Definition at line 229 of file determinize.hh.
Referenced by vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_(), and vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::determinized_automaton_impl().
|
static |
Definition at line 39 of file determinize.hh.
|
private |
Definition at line 236 of file determinize.hh.
Referenced by vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_().