Vcsn  2.2
Be Rational
vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy > Class Template Reference

An automaton whose state names are polynomials of states. More...

#include <polystate-automaton.hh>

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

Public Types

using automaton_t = Aut
 
using context_t = context_t_of< automaton_t >
 
template<typename Ctx = context_t>
using fresh_automaton_t = fresh_automaton_t_of< Aut, Ctx >
 
using super_t = automaton_decorator< fresh_automaton_t<>>
 
using label_t = label_t_of< automaton_t >
 Labels and weights. More...
 
using labelset_t = labelset_t_of< automaton_t >
 
using weightset_t = weightset_t_of< automaton_t >
 
using state_t = state_t_of< automaton_t >
 State index. More...
 
using stateset_t = stateset< automaton_t >
 
using state_nameset_t = polynomialset< context< stateset_t, weightset_t >, Kind >
 The state name: set of (input) states. More...
 
using state_name_t = typename state_nameset_t::value_t
 
using state_bimap_t = state_bimap< polynomialset< context< stateset< Aut >, weightset_t_of< Aut >>, Kind >, stateset< Aut >, Lazy >
 
using queue_t = std::queue< typename state_bimap_t::const_iterator >
 The sets of (input) states waiting to be processed. More...
 
- Public Types inherited from vcsn::detail::automaton_decorator< fresh_automaton_t_of< Aut > >
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

 polystate_automaton_impl (const automaton_t &a)
 Build the determinizer. More...
 
bool state_has_name (state_t s) const
 
state_name_t zero () const
 The empty polynomial of states. More...
 
std::ostream & print_state_name (state_t s, std::ostream &o, format fmt={}, bool delimit=false) const
 
state_t state_ (state_name_t n)
 The state for set of states n. More...
 
- Public Member Functions inherited from vcsn::detail::automaton_decorator< fresh_automaton_t_of< Aut > >
 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 lmul_weight (Args &&...args) -> decltype(aut_-> lmul_weight(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 rmul_weight (Args &&...args) -> decltype(aut_-> rmul_weight(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)...))
 

Public Attributes

automaton_t input_
 Input automaton. More...
 
weightset_t ws_ = *input_->weightset()
 Its weightset. More...
 
state_nameset_t ns_ = {{stateset_t(input_), ws_}}
 (Nameset) The polynomialset that stores weighted states. More...
 
queue_t todo_
 
size_t state_size_ = input_->all_states().back() + 1
 We use state numbers as indexes, so we need to know the last state number. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from vcsn::detail::automaton_decorator< fresh_automaton_t_of< Aut > >
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)...))
 
- Protected Attributes inherited from vcsn::detail::automaton_decorator< fresh_automaton_t_of< Aut > >
automaton_t aut_
 The wrapped automaton, possibly const. More...
 

Detailed Description

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
class vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >

An automaton whose state names are polynomials of states.

Template Parameters
Autthe input automaton type, whose states will form the polynomials of states.
Kindthe desired implemenation of the polynomials.

Definition at line 171 of file polystate-automaton.hh.

Member Typedef Documentation

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::automaton_t = Aut

Definition at line 179 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::context_t = context_t_of<automaton_t>

Definition at line 180 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
template<typename Ctx = context_t>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::fresh_automaton_t = fresh_automaton_t_of<Aut, Ctx>

Definition at line 182 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::label_t = label_t_of<automaton_t>

Labels and weights.

Definition at line 186 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::labelset_t = labelset_t_of<automaton_t>

Definition at line 187 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::queue_t = std::queue<typename state_bimap_t::const_iterator>

The sets of (input) states waiting to be processed.

Definition at line 289 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::state_bimap_t = state_bimap<polynomialset<context<stateset<Aut>, weightset_t_of<Aut>>, Kind>, stateset<Aut>, Lazy>

Definition at line 203 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::state_name_t = typename state_nameset_t::value_t

Definition at line 197 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::state_nameset_t = polynomialset<context<stateset_t, weightset_t>, Kind>

The state name: set of (input) states.

Definition at line 196 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::state_t = state_t_of<automaton_t>

State index.

Definition at line 191 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::stateset_t = stateset<automaton_t>

Definition at line 192 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::super_t = automaton_decorator<fresh_automaton_t<>>

Definition at line 183 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
using vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::weightset_t = weightset_t_of<automaton_t>

Definition at line 188 of file polystate-automaton.hh.

Constructor & Destructor Documentation

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

Build the determinizer.

Parameters
athe automaton to determinize

Definition at line 207 of file polystate-automaton.hh.

References vcsn::detail::automaton_decorator< Aut, Context >::context().

Here is the call graph for this function:

Member Function Documentation

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
std::ostream& vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::print_state_name ( state_t  s,
std::ostream &  o,
format  fmt = {},
bool  delimit = false 
) const
inline

Definition at line 243 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
state_t vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::state_ ( state_name_t  n)
inline

The state for set of states n.

If this is a new state, schedule it for visit.

Definition at line 263 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
bool vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::state_has_name ( state_t  s) const
inline

Definition at line 228 of file polystate-automaton.hh.

References vcsn::has().

Here is the call graph for this function:

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
state_name_t vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::zero ( ) const
inline

The empty polynomial of states.

Definition at line 234 of file polystate-automaton.hh.

Member Data Documentation

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
automaton_t vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::input_

Input automaton.

Definition at line 280 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
state_nameset_t vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::ns_ = {{stateset_t(input_), ws_}}

(Nameset) The polynomialset that stores weighted states.

Definition at line 286 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
size_t vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::state_size_ = input_->all_states().back() + 1

We use state numbers as indexes, so we need to know the last state number.

If states were removed, it is not the same as the number of states.

Definition at line 295 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
queue_t vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::todo_

Definition at line 290 of file polystate-automaton.hh.

template<Automaton Aut, wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>, weightset_t_of<Aut>>(), bool Lazy = false>
weightset_t vcsn::detail::polystate_automaton_impl< Aut, Kind, Lazy >::ws_ = *input_->weightset()

Its weightset.

Definition at line 283 of file polystate-automaton.hh.


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