Vcsn
2.0
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... | |
Public Member Functions | |
composer (const Lhs &lhs, const Rhs &rhs) | |
automaton_t | compose () |
The (accessible part of the) product of lhs_ and rhs_. More... | |
Static Public Member Functions | |
std::size_t static I2 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) |
Private Types | |
template<std::size_t... I> | |
using | seq = vcsn::detail::index_sequence< I...> |
A static list of integers. More... | |
using | label_t = typename labelset_t::value_t |
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... | |
Private Member Functions | |
void | initialize_compose () |
Fill the worklist with the initial source-state pairs, as needed for the product algorithm. More... | |
res_label_t | join_label (hidden_l_label_t ll, hidden_r_label_t rl) |
template<typename Aut > | |
std::enable_if< labelset_t_of < Aut >::has_one(), typename Aut::element_type::res_label_t > ::type | get_hidden_one (const Aut &aut) |
template<typename Aut > | |
std::enable_if<!labelset_t_of < Aut >::has_one(), typename Aut::element_type::res_label_t > ::type | 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 > | |
std::enable_if< labelset_t_of < A >::has_one(), bool >::type | is_one (const A &aut, transition_t_of< A > tr) const |
template<typename A > | |
constexpr std::enable_if <!labelset_t_of< A >::has_one(), bool >::type | is_one (const A &, transition_t_of< A >) const |
template<typename Aut > | |
constexpr std::enable_if <!labelset_t_of< Aut > ::has_one(), bool >::type | has_only_ones_in (const Aut &, state_t_of< Aut >) const |
template<typename Aut > | |
std::enable_if< labelset_t_of < Aut >::has_one(), bool > ::type | has_only_ones_in (const Aut &rhs, state_t_of< Aut > rst) const |
Private Attributes | |
automaton_t | res_ |
The computed product. More... | |
std::tuple< transition_map_t < Lhs >, transition_map_t< Rhs > > | transition_maps_ |
Transition caches. More... | |
Build the (accessible part of the) composition.
Definition at line 30 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 72 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::clhs_t = Lhs |
Definition at line 42 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::context_t = ::vcsn::context<labelset_t, weightset_t> |
Definition at line 68 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::crhs_t = Rhs |
Definition at line 43 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::hidden_l_label_t = typename hidden_l_labelset_t::value_t |
Definition at line 48 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 46 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::hidden_r_label_t = typename hidden_r_labelset_t::value_t |
Definition at line 49 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 47 of file compose.hh.
|
private |
Definition at line 127 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 63 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::middle_labelset_t = labelset_t_of<clhs_t> |
Definition at line 55 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::res_label_t = typename labelset_t::value_t |
Definition at line 67 of file compose.hh.
|
private |
A static list of integers.
Definition at line 39 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 77 of file compose.hh.
using vcsn::detail::composer< Lhs, Rhs >::state_t = state_t_of<automaton_t> |
Result state type.
Definition at line 75 of file compose.hh.
|
private |
The type of our transition maps: convert the weight to weightset_t, non deterministic, and including transitions to post().
Definition at line 133 of file compose.hh.
|
private |
Definition at line 128 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 65 of file compose.hh.
|
inline |
Definition at line 79 of file compose.hh.
References vcsn::detail::composer< Lhs, Rhs >::res_.
|
inlineprivate |
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 167 of file compose.hh.
References vcsn::detail::cross_tuple(), vcsn::detail::transition_map< Aut, WeightSet, Deterministic, AllOut, KeepTransitions >::transition_< KeepTransitions_, Dummy >::dst, vcsn::detail::composer< Lhs, Rhs >::get_hidden_one(), vcsn::detail::composer< Lhs, Rhs >::has_only_ones_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_< KeepTransitions_, Dummy >::wgt, and vcsn::zip_maps().
Referenced by vcsn::detail::composer< Lhs, Rhs >::compose().
|
inline |
The (accessible part of the) product of lhs_ and rhs_.
Definition at line 111 of file compose.hh.
References vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions(), vcsn::detail::composer< Lhs, Rhs >::initialize_compose(), and vcsn::detail::composer< Lhs, Rhs >::res_.
Referenced by vcsn::compose(), and vcsn::is_functional().
|
inlineprivate |
Definition at line 150 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions().
|
inlineprivate |
Definition at line 158 of file compose.hh.
|
inlineprivate |
Definition at line 260 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions().
|
inlineprivate |
Definition at line 268 of file compose.hh.
References vcsn::detail::composer< Lhs, Rhs >::is_one().
|
inlineprivate |
Fill the worklist with the initial source-state pairs, as needed for the product algorithm.
Definition at line 137 of file compose.hh.
References vcsn::detail::composer< Lhs, Rhs >::res_.
Referenced by vcsn::detail::composer< Lhs, Rhs >::compose().
|
inlineprivate |
Definition at line 241 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::has_only_ones_in().
|
inlineprivate |
Definition at line 250 of file compose.hh.
|
inlineprivate |
Definition at line 142 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions().
|
inlinestatic |
Definition at line 104 of file compose.hh.
References vcsn::join(), and vcsn::detail::composer< Lhs, Rhs >::make_labelset_().
|
inlinestatic |
Definition at line 94 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::make_context_().
|
private |
The computed product.
Definition at line 276 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions(), vcsn::detail::composer< Lhs, Rhs >::compose(), vcsn::detail::composer< Lhs, Rhs >::composer(), and vcsn::detail::composer< Lhs, Rhs >::initialize_compose().
|
private |
Transition caches.
Definition at line 278 of file compose.hh.
Referenced by vcsn::detail::composer< Lhs, Rhs >::add_compose_transitions().