31 template <
typename Decorated,
34 typename Aut,
typename... Auts>
43 =
typename tuple_automaton_t::element_type::state_name_t;
45 =
typename tuple_automaton_t::element_type::state_t;
48 template <
size_t... I>
50 =
typename tuple_automaton_t::element_type::template
seq<I...>;
70 template <
typename... T>
73 static symbol res(tuple_automaton_t::element_type::sname_(t...));
82 return aut_->origins();
86 template <
bool L = Lazy>
93 self.add_transitions(s, sn);
96 template <
bool L = Lazy>
118 template <
typename A>
125 template <
typename... Args>
128 return aut_->template state<Lazy>(std::forward<Args>(args)...);
132 std::tuple<typename transition_map_t<Auts>::map_t&...>
138 template <
size_t... I>
139 std::tuple<typename transition_map_t<Auts>::map_t&...>
auto all_out(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions leaving state s.
Decorator implementing the laziness for an algorithm.
std::tuple< typename transition_map_t< Auts >::map_t &... > out_(const state_name_t &ss, seq< I... >)
weightset_t_of< Aut > weightset_t
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
state_t_of< automaton_t > state_t
auto origins() const -> decltype(aut_->origins())
A map from result state to tuple of original states.
auto make_tuple_automaton(const Auts &...auts) -> tuple_automaton< Auts... >
static constexpr auto pre(Args &&...args) -> decltype(element_type::pre(std::forward< Args >(args)...))
state_t state(Args &&...args)
Conversion from state name to state number.
auto all_out(state_t s) const -> decltype(all_out(aut_, s))
All the outgoing transitions.
std::tuple< typename transition_map_t< Auts >::map_t &... > out_(const state_name_t &ss)
The outgoing tuple of transitions from state tuple ss.
automaton_t aut_
The wrapped automaton, possibly const.
Cache the outgoing transitions of an automaton as efficient maps label -> vector<(weight, dst)>.
std::enable_if_t<!L, void > complete_(state_t s) const
std::enable_if_t< L, void > complete_(state_t s) const
Complete a state: find its outgoing transitions.
lazy_tuple_automaton(Aut aut, const Auts &...auts)
std::shared_ptr< detail::tuple_automaton_impl< Auts... >> tuple_automaton
A tuple automaton as a shared pointer.
auto is_lazy(Args &&...args) const -> decltype(aut_-> is_lazy(std::forward< Args >(args)...))
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
Build the (accessible part of the) product.
Aggregate an automaton, and forward calls to it.
std::tuple< transition_map_t< Auts >... > transition_maps_
Transition caches.
static symbol sname_(const T &...t)
tuple_automaton< Aut, Auts... > tuple_automaton_t
The underlying automaton, output and inputs.
auto set_lazy(Args &&...args) -> decltype(aut_-> set_lazy(std::forward< Args >(args)...))
typename tuple_automaton_t::element_type::state_name_t state_name_t
transition_map< A, weightset_t, false, true, KeepTransitions > transition_map_t
The type of our transition maps: convert the weight to weightset_t, non deterministic, and including transitions to post().
typename tuple_automaton_t::element_type::template seq< I... > seq
const weightset_t & ws_
The resulting weightset.
typename context_t::weightset_t weightset_t