![]() |
Vcsn
2.1
Be Rational
|
Build the (accessible part of the) composition. More...
#include <compose.hh>
Public Types | |
using | clhs_t = Lhs |
using | crhs_t = Rhs |
using | hidden_l_labelset_t = typename clhs_t::element_type::res_labelset_t |
using | hidden_r_labelset_t = typename crhs_t::element_type::res_labelset_t |
using | hidden_l_label_t = typename hidden_l_labelset_t::value_t |
using | hidden_r_label_t = typename hidden_r_labelset_t::value_t |
using | middle_labelset_t = labelset_t_of< clhs_t > |
using | labelset_t = typename concat_tupleset< hidden_l_labelset_t, hidden_r_labelset_t >::type |
The type of context of the result. More... | |
using | weightset_t = join_t< weightset_t_of< context_t_of< Lhs >>, weightset_t_of< context_t_of< Rhs >>> |
using | res_label_t = typename labelset_t::value_t |
using | context_t = ::vcsn::context< labelset_t, weightset_t > |
using | automaton_t = tuple_automaton< mutable_automaton< context_t >, Lhs, Rhs > |
The type of the resulting automaton. More... | |
using | state_t = state_t_of< automaton_t > |
Result state type. More... | |
using | state_name_t = typename automaton_t::element_type::state_name_t |
Tuple of states of input automata. More... | |
using | weight_t = typename weightset_t::value_t |
template<typename A > | |
using | transition_map_t = transition_map< A, weightset_t, false, true, true > |
The type of our transition maps: convert the weight to weightset_t, non deterministic, and including transitions to post(). More... | |
Public Member Functions | |
composer (const Lhs &lhs, const Rhs &rhs) | |
void | initialize_compose () |
Fill the worklist with the initial source-state pairs, as needed for the product algorithm. More... | |
res_label_t | join_label (const hidden_l_label_t &ll, const hidden_r_label_t &rl) |
template<typename Aut > | |
vcsn::enable_if_t< labelset_t_of< Aut >::has_one(), typename Aut::element_type::res_label_t > | get_hidden_one (const Aut &aut) |
template<typename Aut > | |
vcsn::enable_if_t<!labelset_t_of< Aut >::has_one(), typename Aut::element_type::res_label_t > | get_hidden_one (const Aut &) |
void | add_compose_transitions (const state_t src, const state_name_t &psrc) |
Add transitions to the given result automaton, starting from the given result input state, which must correspond to the given pair of input state automata. More... | |
template<typename A > | |
vcsn::enable_if_t< labelset_t_of< A >::has_one(), bool > | is_one (const A &aut, transition_t_of< A > tr) const |
template<typename A > | |
constexpr vcsn::enable_if_t<!labelset_t_of< A >::has_one(), bool > | is_one (const A &, transition_t_of< A >) const |
template<typename Aut > | |
constexpr vcsn::enable_if_t<!labelset_t_of< Aut >::has_one(), bool > | is_spontaneous_in (const Aut &, state_t_of< Aut >) const |
Check if the state has only incoming spontaneous transitions. More... | |
template<typename Aut > | |
vcsn::enable_if_t< labelset_t_of< Aut >::has_one(), bool > | is_spontaneous_in (const Aut &rhs, state_t_of< Aut > rst) const |
Whether the state has only incoming spontaneous transitions. More... | |
Static Public Member Functions | |
static labelset_t | make_labelset_ (const hidden_l_labelset_t &ll, const hidden_r_labelset_t &rl) |
template<std::size_t... I1, std::size_t... I2> | |
static labelset_t | make_labelset_ (const hidden_l_labelset_t &ll, seq< I1...>, const hidden_r_labelset_t &rl, seq< I2...>) |
static context_t | make_context_ (const Lhs &lhs, const Rhs &rhs) |
Public Attributes | |
automaton_t | res_ |
The computed product. More... | |
std::tuple< transition_map_t< Lhs >, transition_map_t< Rhs > > | transition_maps_ |
Transition caches. More... | |
Private Types | |
template<std::size_t... I> | |
using | seq = vcsn::detail::index_sequence< I...> |
A static list of integers. More... | |
Build the (accessible part of the) composition.
Definition at line 24 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::automaton_t = tuple_automaton<mutable_automaton<context_t>, Lhs, Rhs> |
The type of the resulting automaton.
Definition at line 66 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::clhs_t = Lhs |
Definition at line 36 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::context_t = ::vcsn::context<labelset_t, weightset_t> |
Definition at line 62 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::crhs_t = Rhs |
Definition at line 37 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::hidden_l_label_t = typename hidden_l_labelset_t::value_t |
Definition at line 42 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::hidden_l_labelset_t = typename clhs_t::element_type::res_labelset_t |
Definition at line 40 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::hidden_r_label_t = typename hidden_r_labelset_t::value_t |
Definition at line 43 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::hidden_r_labelset_t = typename crhs_t::element_type::res_labelset_t |
Definition at line 41 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::labelset_t = typename concat_tupleset<hidden_l_labelset_t, hidden_r_labelset_t>::type |
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 57 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::middle_labelset_t = labelset_t_of<clhs_t> |
Definition at line 49 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::res_label_t = typename labelset_t::value_t |
Definition at line 61 of file compose.hh.
|
private |
A static list of integers.
Definition at line 33 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::state_name_t = typename automaton_t::element_type::state_name_t |
Tuple of states of input automata.
Definition at line 71 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::state_t = state_t_of<automaton_t> |
Result state type.
Definition at line 69 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::transition_map_t = transition_map<A, weightset_t, false, true, true> |
The type of our transition maps: convert the weight to weightset_t, non deterministic, and including transitions to post().
Definition at line 102 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::weight_t = typename weightset_t::value_t |
Definition at line 96 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::weightset_t = join_t<weightset_t_of<context_t_of<Lhs>>, weightset_t_of<context_t_of<Rhs>>> |
Definition at line 59 of file compose.hh.
|
inline |
Definition at line 73 of file compose.hh.
References vcsn::detail::composer< Lhs, Rhs >::res_.
|
inline |
Add transitions to the given 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 161 of file compose.hh.
References vcsn::detail::cross_tuple(), vcsn::detail::transition_map< Aut, WeightSet, Deterministic, AllOut, KeepTransitions >::transition_< Weight, KeepTransitions_, Dummy >::dst, vcsn::detail::composer< Lhs, Rhs >::get_hidden_one(), vcsn::detail::composer< Lhs, Rhs >::is_spontaneous_in(), vcsn::detail::composer< Lhs, Rhs >::join_label(), vcsn::detail::composer< Lhs, Rhs >::res_, vcsn::detail::composer< Lhs, Rhs >::transition_maps_, vcsn::detail::transition_map< Aut, WeightSet, Deterministic, AllOut, KeepTransitions >::transition_< Weight, KeepTransitions_, Dummy >::weight(), and vcsn::zip_maps().
|
inline |
Definition at line 144 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions().
|
inline |
Definition at line 152 of file compose.hh.
|
inline |
Fill the worklist with the initial source-state pairs, as needed for the product algorithm.
Definition at line 130 of file compose.hh.
References vcsn::detail::composer< Lhs, Rhs >::res_.
|
inline |
Definition at line 229 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::is_spontaneous_in().
|
inline |
Definition at line 237 of file compose.hh.
|
inline |
Check if the state has only incoming spontaneous transitions.
As it is in the case of the one-free labelset, it's always false.
Definition at line 249 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions().
|
inline |
Whether the state has only incoming spontaneous transitions.
The automaton has been insplit, so either all incoming transitions are proper, or all transitions are spontaneous (including the first one).
Definition at line 260 of file compose.hh.
References vcsn::detail::composer< Lhs, Rhs >::is_one().
|
inline |
Definition at line 135 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions().
|
inlinestatic |
Definition at line 122 of file compose.hh.
References vcsn::join(), and vcsn::detail::composer< Lhs, Rhs >::make_labelset_().
|
inlinestatic |
Definition at line 104 of file compose.hh.
References vcsn::rat::size().
Referenced by vcsn::detail::composer< Lhs, Rhs >::make_context_().
|
inlinestatic |
Definition at line 112 of file compose.hh.
automaton_t vcsn::detail::composer< Lhs, Rhs >::res_ |
The computed product.
Definition at line 268 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions(), vcsn::detail::composer< Lhs, Rhs >::composer(), and vcsn::detail::composer< Lhs, Rhs >::initialize_compose().
std::tuple<transition_map_t<Lhs>, transition_map_t<Rhs> > vcsn::detail::composer< Lhs, Rhs >::transition_maps_ |
Transition caches.
Definition at line 270 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions().