Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::detail::tuple_automaton_impl< Aut, Auts > Class Template Reference

An automaton whose states are tuples of states of automata. More...

#include <tuple-automaton.hh>

Inheritance diagram for vcsn::detail::tuple_automaton_impl< Aut, Auts >:
Collaboration diagram for vcsn::detail::tuple_automaton_impl< Aut, Auts >:

Public Types

using context_t = context_t_of< Aut >
 The type of context of the result. More...
 
using labelset_t = labelset_t_of< context_t >
 
using weightset_t = weightset_t_of< context_t >
 
using label_t = typename labelset_t::value_t
 
using weight_t = typename weightset_t::value_t
 
using automata_t = std::tuple< Auts...>
 The type of input automata. More...
 
template<size_t I>
using input_automaton_t = base_t< typename std::tuple_element< I, automata_t >::type >
 The type of the Ith input automaton, unqualified. More...
 
using state_t = state_t_of< automaton_t >
 Result state type. More...
 
using state_name_t = std::tuple< state_t_of< Auts >...>
 State names: Tuple of states of input automata. More...
 
using origins_t = std::map< state_t, state_name_t >
 A map from result state to tuple of original states. More...
 
template<std::size_t... I>
using seq = vcsn::detail::index_sequence< I...>
 A static list of integers. More...
 
using indices_t = vcsn::detail::make_index_sequence< sizeof...(Auts)>
 The list of automaton indices as a static list. More...
 
using map = std::map< state_name_t, state_t >
 Map state-tuple -> result-state. More...
 
- Public Types inherited from vcsn::detail::automaton_decorator< Aut >
using automaton_t = Aut
 The type of automaton to wrap. More...
 
using automaton_nocv_t = typename automaton_t::element_type::automaton_nocv_t
 The (shared pointer) type to use it we have to create an automaton of the same (underlying) type. More...
 
using context_t = Context
 
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 >
 
using transitions_output_t = typename Aut::element_type::transitions_output_t
 

Public Member Functions

std::string vname (bool full=true) const
 
 tuple_automaton_impl (const automaton_t &aut, const Auts &...auts)
 
bool state_has_name (typename super_t::state_t s) const
 
std::ostream & print_state_name (typename super_t::state_t s, std::ostream &o, const std::string &fmt="text", bool delimit=false) const
 
const origins_torigins () const
 A map from result state to tuple of original states. More...
 
std::string vname_ (bool full=true) const
 The vname of the sub automata. More...
 
template<size_t... I>
std::string vname_ (bool full, seq< I...>) const
 
state_name_t pre_ () const
 The name of the pre of the output automaton. More...
 
template<size_t... I>
state_name_t pre_ (seq< I...>) const
 
state_name_t post_ () const
 The name of the post of the output automaton. More...
 
template<size_t... I>
state_name_t post_ (seq< I...>) const
 
state_t state (state_name_t state)
 The state in the product corresponding to a pair of states of operands. More...
 
state_t state (state_t_of< Auts >...ss)
 
template<size_t... I>
std::ostream & print_state_name_ (typename super_t::state_t s, std::ostream &o, const std::string &fmt, seq< I...>) const
 
- Public Member Functions inherited from vcsn::detail::automaton_decorator< 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 ()
 
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 final_transitions (Args &&...args) const -> decltype(aut_-> final _transitions(std
 
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_transition (Args &&...args) const -> decltype(aut_-> has_transition(std::forward< Args >(args)...))
 
auto has_state (Args &&...args) const -> decltype(aut_-> has_state(std::forward< Args >(args)...))
 
auto in (Args &&...args) const -> decltype(aut_-> in(std::forward< Args >(args)...))
 
auto initial_transitions (Args &&...args) const -> decltype(aut_-> initial_transitions(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 out (Args &&...args) const -> decltype(aut_-> out(std::forward< Args >(args)...))
 
auto outin (Args &&...args) const -> decltype(aut_-> outin(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 states (Args &&...args) const -> decltype(aut_-> states(std::forward< Args >(args)...))
 
auto transitions (Args &&...args) const -> decltype(aut_-> transitions(std::forward< Args >(args)...))
 
auto vname (Args &&...args) const -> decltype(aut_-> vname(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_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 std::string sname ()
 
static std::string sname_ ()
 The sname of the sub automata. More...
 
- Static Public Member Functions inherited from vcsn::detail::automaton_decorator< Aut >
static constexpr auto null_state (Args &&...args) -> decltype(automaton_t::element_type::null_state(std::forward< Args >(args)...))
 
static constexpr auto null_transition (Args &&...args) -> decltype(automaton_t::element_type::null_transition(std::forward< Args >(args)...))
 
static constexpr auto post (Args &&...args) -> decltype(automaton_t::element_type::post(std::forward< Args >(args)...))
 
static constexpr auto pre (Args &&...args) -> decltype(automaton_t::element_type::pre(std::forward< Args >(args)...))
 
static constexpr auto sname (Args &&...args) -> decltype(automaton_t::element_type::sname(std::forward< Args >(args)...))
 

Public Attributes

automata_t auts_
 Input automata, supplied at construction time. More...
 
map pmap_
 
std::deque< state_name_ttodo_
 Worklist of state tuples. More...
 
origins_t origins_
 

Static Public Attributes

static constexpr indices_t indices {}
 

Private Types

using automaton_t = Aut
 The type of the resulting automaton. More...
 
using super_t = automaton_decorator< automaton_t >
 

Additional Inherited Members

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

Detailed Description

template<typename Aut, typename... Auts>
class vcsn::detail::tuple_automaton_impl< Aut, Auts >

An automaton whose states are tuples of states of automata.

Corresponds to the Cartesian product of states.

Template Parameters
Autthe output automaton type
Autsthe input automaton types

Definition at line 30 of file tuple-automaton.hh.

Member Typedef Documentation

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::automata_t = std::tuple<Auts...>

The type of input automata.

Definition at line 63 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::automaton_t = Aut
private

The type of the resulting automaton.

Definition at line 34 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::context_t = context_t_of<Aut>

The type of context of the result.

The type is the "join" of the contexts, independently of the algorithm. However, its value differs: in the case of the product, the labelset is the meet of the labelsets, it is its join for shuffle and infiltration.

Definition at line 54 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::indices_t = vcsn::detail::make_index_sequence<sizeof...(Auts)>

The list of automaton indices as a static list.

Definition at line 124 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
template<size_t I>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::input_automaton_t = base_t<typename std::tuple_element<I, automata_t>::type>

The type of the Ith input automaton, unqualified.

Definition at line 68 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::label_t = typename labelset_t::value_t

Definition at line 58 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::labelset_t = labelset_t_of<context_t>

Definition at line 55 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::map = std::map<state_name_t, state_t>

Map state-tuple -> result-state.

Definition at line 240 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::origins_t = std::map<state_t, state_name_t>

A map from result state to tuple of original states.

Definition at line 107 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
template<std::size_t... I>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::seq = vcsn::detail::index_sequence<I...>

A static list of integers.

Definition at line 121 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::state_name_t = std::tuple<state_t_of<Auts>...>

State names: Tuple of states of input automata.

Definition at line 104 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::state_t = state_t_of<automaton_t>

Result state type.

Definition at line 102 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::super_t = automaton_decorator<automaton_t>
private

Definition at line 35 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::weight_t = typename weightset_t::value_t

Definition at line 59 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
using vcsn::detail::tuple_automaton_impl< Aut, Auts >::weightset_t = weightset_t_of<context_t>

Definition at line 56 of file tuple-automaton.hh.

Constructor & Destructor Documentation

template<typename Aut, typename... Auts>
vcsn::detail::tuple_automaton_impl< Aut, Auts >::tuple_automaton_impl ( const automaton_t aut,
const Auts &...  auts 
)
inline

Definition at line 73 of file tuple-automaton.hh.

Member Function Documentation

template<typename Aut, typename... Auts>
const origins_t& vcsn::detail::tuple_automaton_impl< Aut, Auts >::origins ( ) const
inline

A map from result state to tuple of original states.

Definition at line 110 of file tuple-automaton.hh.

Referenced by vcsn::detail::tuple_automaton_impl< Aut, Auts...>::print_state_name_(), and vcsn::detail::tuple_automaton_impl< Aut, Auts...>::state_has_name().

template<typename Aut, typename... Auts>
state_name_t vcsn::detail::tuple_automaton_impl< Aut, Auts >::post_ ( ) const
inline
template<typename Aut, typename... Auts>
template<size_t... I>
state_name_t vcsn::detail::tuple_automaton_impl< Aut, Auts >::post_ ( seq< I...>  ) const
inline

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

template<typename Aut, typename... Auts>
state_name_t vcsn::detail::tuple_automaton_impl< Aut, Auts >::pre_ ( ) const
inline
template<typename Aut, typename... Auts>
template<size_t... I>
state_name_t vcsn::detail::tuple_automaton_impl< Aut, Auts >::pre_ ( seq< I...>  ) const
inline

Definition at line 168 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
std::ostream& vcsn::detail::tuple_automaton_impl< Aut, Auts >::print_state_name ( typename super_t::state_t  s,
std::ostream &  o,
const std::string &  fmt = "text",
bool  delimit = false 
) const
inline
template<typename Aut, typename... Auts>
template<size_t... I>
std::ostream& vcsn::detail::tuple_automaton_impl< Aut, Auts >::print_state_name_ ( typename super_t::state_t  s,
std::ostream &  o,
const std::string &  fmt,
seq< I...>   
) const
inline
template<typename Aut, typename... Auts>
static std::string vcsn::detail::tuple_automaton_impl< Aut, Auts >::sname ( )
inlinestatic

Definition at line 38 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
static std::string vcsn::detail::tuple_automaton_impl< Aut, Auts >::sname_ ( )
inlinestatic
template<typename Aut, typename... Auts>
state_t vcsn::detail::tuple_automaton_impl< Aut, Auts >::state ( state_name_t  state)
inline

The state in the product corresponding to a pair of states of operands.

Add the given two source-automaton states to the worklist for the given result automaton if they aren't already there, updating the map; in any case return.

Definition at line 195 of file tuple-automaton.hh.

Referenced by vcsn::detail::tuple_automaton_impl< Aut, Auts...>::state().

template<typename Aut, typename... Auts>
state_t vcsn::detail::tuple_automaton_impl< Aut, Auts >::state ( state_t_of< Auts >...  ss)
inline

Definition at line 206 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
bool vcsn::detail::tuple_automaton_impl< Aut, Auts >::state_has_name ( typename super_t::state_t  s) const
inline

Definition at line 81 of file tuple-automaton.hh.

template<typename Aut, typename... Auts>
std::string vcsn::detail::tuple_automaton_impl< Aut, Auts >::vname ( bool  full = true) const
inline
template<typename Aut, typename... Auts>
std::string vcsn::detail::tuple_automaton_impl< Aut, Auts >::vname_ ( bool  full = true) const
inline
template<typename Aut, typename... Auts>
template<size_t... I>
std::string vcsn::detail::tuple_automaton_impl< Aut, Auts >::vname_ ( bool  full,
seq< I...>   
) const
inline

Definition at line 148 of file tuple-automaton.hh.

Member Data Documentation

template<typename Aut, typename... Auts>
origins_t vcsn::detail::tuple_automaton_impl< Aut, Auts >::origins_
mutable
template<typename Aut, typename... Auts>
std::deque<state_name_t> vcsn::detail::tuple_automaton_impl< Aut, Auts >::todo_

Worklist of state tuples.

Definition at line 244 of file tuple-automaton.hh.

Referenced by vcsn::detail::tuple_automaton_impl< Aut, Auts...>::state().


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