Vcsn  2.3
Be Rational
vcsn::detail::tuple_automata_impl< Aut, Auts > Class Template Reference

Build the (accessible part of the) Cartesian product of automata. More...

#include <tuple-automaton.hh>

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

Public Types

using state_name_t = typename super_t::state_name_t
 
using state_t = typename super_t::state_t
 
template<size_t... I>
using seq = typename super_t::template seq< I... >
 
using context_t = context_t_of< Aut >
 The 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< tuple_element_t< I, automata_t >>
 The type of the Ith input automaton, unqualified. More...
 
- Public Types inherited from vcsn::detail::lazy_tuple_automaton< tuple_automata_impl< Aut, Auts... >, false, false, Aut, Auts... >
using tuple_automaton_t = tuple_automaton< Aut, Auts... >
 The underlying automaton, output and inputs. More...
 
using tuple_automaton_impl = typename tuple_automaton_t::element_type
 
using state_name_t = typename tuple_automaton_impl::state_name_t
 
using state_t = typename tuple_automaton_impl::state_t
 
using seq = typename tuple_automaton_impl::template seq< I... >
 
using self_t = lazy_tuple_automaton
 
using super_t = automaton_decorator< tuple_automaton_t >
 
using decorated_t = tuple_automata_impl< Aut, Auts... >
 The automaton holding the logic. More...
 
using weightset_t = weightset_t_of< Aut >
 
- Public Types inherited from vcsn::detail::automaton_decorator< tuple_automaton< Aut, Auts... > >
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

 tuple_automata_impl (Aut aut, const Auts &...auts)
 Build a tuple automaton. More...
 
void tuple ()
 Compute the (accessible part of the) tuple. More...
 
- Public Member Functions inherited from vcsn::detail::lazy_tuple_automaton< tuple_automata_impl< Aut, Auts... >, false, false, Aut, Auts... >
 lazy_tuple_automaton (Aut aut, const Auts &...auts)
 
auto origins () const -> decltype(aut_->origins())
 A map from result state to tuple of original states. More...
 
void complete_ (state_t s) const
 Complete a state: find its outgoing transitions. 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< tuple_automaton< Aut, Auts... > >
 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)...))
 

Private Types

using automaton_t = Aut
 The type of the resulting automaton. More...
 
using self_t = tuple_automata_impl
 
using super_t = lazy_tuple_automaton< self_t, false, false, Aut, Auts... >
 

Private Member Functions

void add_tuple_transitions (const state_t src, const state_name_t &psrc)
 Add transitions to the result automaton, starting from the given result input state, which must correspond to the given pair of input state automata. More...
 
template<std::size_t... I>
void add_tuple_transitions_ (const state_t src, const state_name_t &psrc, seq< I... >)
 
template<std::size_t I>
void add_tape_transitions_ (const state_t src, const state_name_t &psrc, state_name_t dst, label_t label, weight_t weight)
 

Additional Inherited Members

- Static Public Member Functions inherited from vcsn::detail::lazy_tuple_automaton< tuple_automata_impl< Aut, Auts... >, false, false, Aut, Auts... >
static symbol sname_ (const T &...t)
 
- Static Public Member Functions inherited from vcsn::detail::automaton_decorator< tuple_automaton< Aut, Auts... > >
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 Types inherited from vcsn::detail::lazy_tuple_automaton< tuple_automata_impl< Aut, Auts... >, false, false, Aut, Auts... >
using transition_map_t = transition_map< A, weightset_t, false, true, KeepTransitions >
 The type of our transition maps: convert the weight to weightset_t, non deterministic, and including transitions to post(). More...
 
- Protected Member Functions inherited from vcsn::detail::lazy_tuple_automaton< tuple_automata_impl< Aut, Auts... >, false, false, Aut, Auts... >
state_t state (Args &&...args)
 Conversion from state name to state number. More...
 
std::tuple< typename transition_map_t< Auts >::map_t &... > out_ (const state_name_t &ss)
 The outgoing tuple of transitions from state tuple ss. More...
 
std::tuple< typename transition_map_t< Auts >::map_t &... > out_ (const state_name_t &ss, seq< I... >)
 
- Protected Attributes inherited from vcsn::detail::lazy_tuple_automaton< tuple_automata_impl< Aut, Auts... >, false, false, Aut, Auts... >
const weightset_tws_
 The resulting weightset. More...
 
std::tuple< transition_map_t< Auts >... > transition_maps_
 Transition caches. More...
 
- Protected Attributes inherited from vcsn::detail::automaton_decorator< tuple_automaton< Aut, Auts... > >
automaton_t aut_
 The wrapped automaton, possibly const. More...
 

Detailed Description

template<Automaton Aut, Automaton... Auts>
class vcsn::detail::tuple_automata_impl< Aut, Auts >

Build the (accessible part of the) Cartesian product of automata.

Warning: beware of naming issues: do not confuse it with tuple_automaton_impl which is actually an automaton decorator whose states are tuples of states of other automata. This class, tuple_automata_impl, derives (indirectly) from tuple_automaton_impl.

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

Member Typedef Documentation

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::automata_t = std::tuple<Auts...>

The type of input automata.

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

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::automaton_t = Aut
private

The type of the resulting automaton.

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

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::context_t = context_t_of<Aut>

The context of the result.

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

template<Automaton Aut, Automaton... Auts>
template<size_t I>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::input_automaton_t = base_t<tuple_element_t<I, automata_t>>

The type of the Ith input automaton, unqualified.

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

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

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

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::labelset_t = labelset_t_of<context_t>

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

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::self_t = tuple_automata_impl
private

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

template<Automaton Aut, Automaton... Auts>
template<size_t... I>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::seq = typename super_t::template seq<I...>

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

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::state_name_t = typename super_t::state_name_t

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

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::state_t = typename super_t::state_t

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

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::super_t = lazy_tuple_automaton<self_t, false, false, Aut, Auts...>
private

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

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

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

template<Automaton Aut, Automaton... Auts>
using vcsn::detail::tuple_automata_impl< Aut, Auts >::weightset_t = weightset_t_of<context_t>

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

Constructor & Destructor Documentation

template<Automaton Aut, Automaton... Auts>
vcsn::detail::tuple_automata_impl< Aut, Auts >::tuple_automata_impl ( Aut  aut,
const Auts &...  auts 
)
inline

Build a tuple automaton.

Parameters
autthe automaton to build.
autsthe input automata.

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

Member Function Documentation

template<Automaton Aut, Automaton... Auts>
template<std::size_t I>
void vcsn::detail::tuple_automata_impl< Aut, Auts >::add_tape_transitions_ ( const state_t  src,
const state_name_t psrc,
state_name_t  dst,
label_t  label,
weight_t  weight 
)
inlineprivate

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

References vcsn::detail::automaton_decorator< tuple_automaton< Aut, Auts... > >::aut_, vcsn::detail::label_one(), vcsn::detail::lazy_tuple_automaton< tuple_automata_impl< Aut, Auts... >, false, false, Aut, Auts... >::state(), and vcsn::detail::static_if().

Here is the call graph for this function:

template<Automaton Aut, Automaton... Auts>
void vcsn::detail::tuple_automata_impl< Aut, Auts >::add_tuple_transitions ( const state_t  src,
const state_name_t psrc 
)
inlineprivate

Add transitions to the result automaton, starting from the given result input state, which must correspond to the given pair of input state automata.

Update the worklist with the needed source-state pairs.

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

References vcsn::detail::tuple_automata_impl< Aut, Auts >::add_tuple_transitions_(), and vcsn::detail::automaton_decorator< tuple_automaton< Aut, Auts... > >::aut_.

Referenced by vcsn::detail::tuple_automata_impl< Aut, Auts >::tuple().

Here is the call graph for this function:

template<Automaton Aut, Automaton... Auts>
template<std::size_t... I>
void vcsn::detail::tuple_automata_impl< Aut, Auts >::add_tuple_transitions_ ( const state_t  src,
const state_name_t psrc,
seq< I... >   
)
inlineprivate

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

References vcsn::all(), and vcsn::detail::automaton_decorator< tuple_automaton< Aut, Auts... > >::aut_.

Referenced by vcsn::detail::tuple_automata_impl< Aut, Auts >::add_tuple_transitions().

Here is the call graph for this function:

template<Automaton Aut, Automaton... Auts>
void vcsn::detail::tuple_automata_impl< Aut, Auts >::tuple ( )
inline

Compute the (accessible part of the) tuple.

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

References vcsn::detail::tuple_automata_impl< Aut, Auts >::add_tuple_transitions(), and vcsn::detail::automaton_decorator< tuple_automaton< Aut, Auts... > >::aut_.

Here is the call graph for this function:


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