17 #ifndef AWALI_TUPLE_HISTORY_HH
18 # define AWALI_TUPLE_HISTORY_HH
47 template <
typename Auts>
73 const std::string& fmt)
const override
92 template <std::size_t... I>
99 template <
size_t... I>
102 const std::string& fmt,
106 const char* sep =
"";
107 using swallow =
int[];
111 std::get<I>(
auts_)->print_state_history(std::get<I>(i->second),
139 throw std::runtime_error(
"Origin state not available");
142 template <
size_t... I>
144 return {std::get<I>(
origins_[s])...};
base type for history of automata
Definition: history.hh:40
An automaton whose states are tuples of states of automata.
Definition: tuple_history.hh:49
history_kind_t get_nature() const override
The type of the resulting automaton.
Definition: tuple_history.hh:52
bool remove_history(state_t s) override
Definition: tuple_history.hh:123
tuple_history(const automata_t &auts)
Definition: tuple_history.hh:67
std::ostream & print_state_name(state_t s, std::ostream &o, const std::string &fmt) const override
Definition: tuple_history.hh:72
void add_state(state_t s, const tuple_t &set)
Definition: tuple_history.hh:128
typename std::cst_tuple< state_t, std::tuple_size< Auts >::value >::type tuple_t
Tuple of states of input automata.
Definition: tuple_history.hh:60
static constexpr indices_t indices
Definition: tuple_history.hh:97
bool has_history(state_t s) const override
Definition: tuple_history.hh:119
std::ostream & print_state_name_(state_t s, std::ostream &o, const std::string &fmt, seq< I... >) const
Definition: tuple_history.hh:101
state_t get_state(state_t) override
Definition: tuple_history.hh:138
Auts automata_t
The type of origin automata.
Definition: tuple_history.hh:58
automata_t auts_
Origin automata, supplied at construction time.
Definition: tuple_history.hh:134
origins_t origins_
Definition: tuple_history.hh:136
std::map< state_t, tuple_t > origins_t
A map from result state to tuple of original states.
Definition: tuple_history.hh:83
std::vector< state_t > get_state_set(state_t s, seq< I... >)
Definition: tuple_history.hh:143
internal::base_t< typename std::tuple_element< I, automata_t >::type > input_automaton_t
The type of the Ith origin automaton, unqualified.
Definition: tuple_history.hh:65
const origins_t & origins() const
Definition: tuple_history.hh:85
std::vector< state_t > get_state_set(state_t s) override
Definition: tuple_history.hh:148
history_kind_t
The different kinds of history.
Definition: enums.hh:178
@ TUPLE
The states comes from a tuple of state.
typename std::remove_cv< typename std::remove_reference< T >::type >::type base_t
T without reference or const/volatile qualifiers.
Definition: traits.hh:30
Main namespace of Awali.
Definition: ato.hh:22
unsigned state_t
Definition: types.hh:21