Vcsn  2.3a
Be Rational
vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy > Class Template Reference

The subset construction automaton from another. More...

#include <determinize.hh>

Inheritance diagram for vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >:
Collaboration diagram for vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >:

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...
 
- Public Types inherited from vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >
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...
 
- Public Member Functions inherited from vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >
 automaton_decorator (automaton_t aut)
 
 automaton_decorator (const automaton_decorator &aut)
 
 automaton_decorator (const context_t &ctx)
 
 automaton_decorator (automaton_decorator &&aut)
 
automaton_decoratoroperator= (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 Public Member Functions inherited from vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >
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

- Protected Attributes inherited from vcsn::detail::automaton_decorator< polystate_automaton< Aut, Kind, Lazy > >
automaton_t aut_
 The wrapped automaton, possibly const. More...
 

Detailed Description

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
class vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >

The subset construction automaton from another.

Template Parameters
Autthe input automaton type.
Precondition
labelset is free.

Definition at line 31 of file determinize.hh.

Member Typedef Documentation

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::automaton_t = Aut

Definition at line 38 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
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.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::label_map_t = std::unordered_map<label_t, state_name_t, vcsn::hash<labelset_t>, vcsn::equal_to<labelset_t>>
private

successors[SOURCE-STATE][LABEL] = DEST-STATESET.

Definition at line 234 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::label_t = label_t_of<automaton_t>

Definition at line 47 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::labelset_t = labelset_t_of<automaton_t>

Definition at line 46 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::self_t = determinized_automaton_impl

Definition at line 42 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
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.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::state_t = state_t_of<automaton_t>

Definition at line 53 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::stateset_t = stateset<automaton_t>

State index.

Definition at line 52 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::successors_t = std::map<state_t, label_map_t>
private

Definition at line 235 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
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.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::weight_t = weight_t_of<automaton_t>

Definition at line 49 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
using vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::weightset_t = weightset_t_of<automaton_t>

Definition at line 48 of file determinize.hh.

Constructor & Destructor Documentation

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::determinized_automaton_impl ( const automaton_t a)
inline

Build the determinizer.

Parameters
athe 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_.

Here is the call graph for this function:

Member Function Documentation

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
auto vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::all_out ( state_t  s) const -> decltype(all_out(aut_, s))
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_().

Here is the call graph for this function:

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
void vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_ ( state_t  s) const
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()().

Here is the call graph for this function:

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
template<wet_kind_t K = kind>
auto vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_ ( state_t  src,
const state_name_t ss 
) -> std::enable_if_t<K == wet_kind_t::bitset>
inlineprivate
template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
template<wet_kind_t K = kind>
auto vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::complete_ ( state_t  src,
const state_name_t ss 
) -> std::enable_if_t<K != wet_kind_t::bitset>
inlineprivate
template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
void vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::operator() ( )
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_().

Here is the call graph for this function:

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
auto vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::origins ( ) const
inline
template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
std::ostream& vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::print_set ( std::ostream &  o,
format  fmt = {} 
) const
inline

Definition at line 90 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
static symbol vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::sname ( )
inlinestatic

Definition at line 80 of file determinize.hh.

References vcsn::res, vcsn::sname(), and vcsn::to_string().

Here is the call graph for this function:

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
auto vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::strip ( ) const
inline

Member Data Documentation

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
state_name_t vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::finals_ = aut_->zero()
private
template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
constexpr wet_kind_t vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::kind = Kind
static

Definition at line 39 of file determinize.hh.

template<Automaton Aut, wet_kind_t Kind, bool Lazy = false>
successors_t vcsn::detail::determinized_automaton_impl< Aut, Kind, Lazy >::successors_
private

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