Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MaximalEndComponent.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_MAXIMALENDCOMPONENT_H_
2#define STORM_STORAGE_MAXIMALENDCOMPONENT_H_
3
4#include <unordered_map>
5
8
9namespace storm {
10namespace storage {
11// fwd
12class BitVector;
13
18 public:
20 typedef std::unordered_map<uint_fast64_t, set_type> map_type;
21 typedef map_type::iterator iterator;
22 typedef map_type::const_iterator const_iterator;
23
28
35
42
49
56
60 bool operator==(MaximalEndComponent const& other);
61
65 bool operator!=(MaximalEndComponent const& other);
66
73 void addState(uint_fast64_t state, set_type const& choices);
74
81 void addState(uint_fast64_t state, set_type&& choices);
82
86 std::size_t size() const;
87
95 set_type const& getChoicesForState(uint_fast64_t state) const;
96
104 set_type& getChoicesForState(uint_fast64_t state);
105
111 void removeState(uint_fast64_t state);
112
119 bool containsState(uint_fast64_t state) const;
120
127 bool containsAnyState(storm::storage::BitVector stateSet) const;
128
136 bool containsChoice(uint_fast64_t state, uint_fast64_t choice) const;
137
143 set_type getStateSet() const;
144
150 iterator begin();
151
157 iterator end();
158
164 const_iterator begin() const;
165
171 const_iterator end() const;
172
173 // Declare the streaming operator as a friend function.
174 friend std::ostream& operator<<(std::ostream& out, MaximalEndComponent const& component);
175
176 private:
177 // This stores the mapping from states contained in the MEC to the choices in this MEC.
178 map_type stateToChoicesMapping;
179};
180} // namespace storage
181} // namespace storm
182
183#endif /* STORM_STORAGE_MAXIMALENDCOMPONENT_H_ */
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
This class represents a maximal end-component of a nondeterministic model.
iterator end()
Retrieves an iterator that points past the last state and its choices in the MEC.
bool operator!=(MaximalEndComponent const &other)
set_type const & getChoicesForState(uint_fast64_t state) const
Retrieves the choices for the given state that are contained in this MEC under the assumption that th...
set_type getStateSet() const
Retrieves the set of states contained in the MEC.
map_type::const_iterator const_iterator
storm::storage::FlatSet< sparse::state_type > set_type
void addState(uint_fast64_t state, set_type const &choices)
Adds the given state and the given choices to the MEC.
friend std::ostream & operator<<(std::ostream &out, MaximalEndComponent const &component)
bool operator==(MaximalEndComponent const &other)
std::unordered_map< uint_fast64_t, set_type > map_type
bool containsAnyState(storm::storage::BitVector stateSet) const
Retrieves whether at least one of the given states is contained in this MEC.
bool containsState(uint_fast64_t state) const
Retrieves whether the given state is contained in this MEC.
void removeState(uint_fast64_t state)
Removes the given state and all of its choices from the MEC.
iterator begin()
Retrieves an iterator that points to the first state and its choices in the MEC.
MaximalEndComponent & operator=(MaximalEndComponent const &other)
Assigns the contents of the given MEC to the current one via copying.
bool containsChoice(uint_fast64_t state, uint_fast64_t choice) const
Retrieves whether the given choice for the given state is contained in the MEC.
boost::container::flat_set< Key, std::less< Key >, boost::container::new_allocator< Key > > FlatSet
Redefinition of flat_set was needed, because from Boost 1.70 on the default allocator is set to void.
Definition BoostTypes.h:13
storage::BitVector BitVector
LabParser.cpp.
Definition cli.cpp:18