Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MaximalEndComponent.h
Go to the documentation of this file.
1#pragma once
2
3#include <unordered_map>
4
7
8namespace storm {
9namespace storage {
10// fwd
11class BitVector;
12
17 public:
19 typedef std::unordered_map<uint_fast64_t, set_type> map_type;
20 typedef map_type::iterator iterator;
21 typedef map_type::const_iterator const_iterator;
22
27
34
41
48
55
59 bool operator==(MaximalEndComponent const& other) const;
60
64 bool operator!=(MaximalEndComponent const& other) const;
65
72 void addState(uint_fast64_t state, set_type const& choices);
73
80 void addState(uint_fast64_t state, set_type&& choices);
81
85 std::size_t size() const;
86
94 set_type const& getChoicesForState(uint_fast64_t state) const;
95
103 set_type& getChoicesForState(uint_fast64_t state);
104
110 void removeState(uint_fast64_t state);
111
118 bool containsState(uint_fast64_t state) const;
119
126 bool containsAnyState(storm::storage::BitVector stateSet) const;
127
135 bool containsChoice(uint_fast64_t state, uint_fast64_t choice) const;
136
142 set_type getStateSet() const;
143
149 iterator begin();
150
156 iterator end();
157
163 const_iterator begin() const;
164
170 const_iterator end() const;
171
172 // Declare the streaming operator as a friend function.
173 friend std::ostream& operator<<(std::ostream& out, MaximalEndComponent const& component);
174
175 private:
176 // This stores the mapping from states contained in the MEC to the choices in this MEC.
177 map_type stateToChoicesMapping;
178};
179} // namespace storage
180} // namespace storm
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
iterator end()
Retrieves an iterator that points past the last state and its choices in the MEC.
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.
bool operator!=(MaximalEndComponent const &other) const
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)
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.
bool operator==(MaximalEndComponent const &other) const
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