17 #ifndef AWALI_PARTITION_HISTORY_HH
18 # define AWALI_PARTITION_HISTORY_HH
41 template <
typename Autb>
49 std::map<state_t, state_set_t> origins_;
64 return (origins_.find(s)!=origins_.end());
68 return origins_.erase(s);
73 const std::string& fmt)
const
75 const auto& set = origins_.at(s);
76 const char* separator =
"{";
80 from_->print_state_history(s, o, fmt);
87 const std::map<state_t, state_set_t>&
origins()
const
103 throw std::runtime_error(
"Origin state not available");
107 std::vector<state_t> v(origins_[s].begin(),origins_[s].end());
base type for history of automata
Definition: history.hh:40
specialisation of history_base
Definition: partition_history.hh:43
bool remove_history(state_t s)
Definition: partition_history.hh:67
void add_state(state_t s, const state_set_t &set)
set the history of state s
Definition: partition_history.hh:94
const std::map< state_t, state_set_t > & origins() const
map between states of the automaton and subsets of states of the source
Definition: partition_history.hh:87
std::vector< state_t > get_state_set(state_t s)
Definition: partition_history.hh:106
history_kind_t get_nature() const
Definition: partition_history.hh:58
partition_history(const Autb &source)
Definition: partition_history.hh:53
state_t get_state(state_t s)
unsupported method : use get_state_set
Definition: partition_history.hh:102
std::set< state_t > state_set_t
Definition: partition_history.hh:46
std::ostream & print_state_name(state_t s, std::ostream &o, const std::string &fmt) const
Definition: partition_history.hh:72
bool has_history(state_t s) const
Definition: partition_history.hh:63
history_kind_t
The different kinds of history.
Definition: enums.hh:176
@ PARTITION
The state is a set of states of another automaton.
Main namespace of Awali.
Definition: ato.hh:22
unsigned state_t
Definition: types.hh:21