Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateLabeling.h
Go to the documentation of this file.
1#pragma once
2
3#include <ostream>
4#include <set>
5#include <unordered_map>
6
9
11
12namespace storm {
13namespace models {
14namespace sparse {
15
20 public:
26 StateLabeling(uint_fast64_t stateCount = 0);
27
28 StateLabeling(StateLabeling const& other) = default;
29 StateLabeling(ItemLabeling const& other);
30 StateLabeling(ItemLabeling const&& other);
31 StateLabeling& operator=(StateLabeling const& other) = default;
32
33 virtual bool isStateLabeling() const override;
34
41 bool operator==(StateLabeling const& other) const;
42
49
56 std::set<std::string> getLabelsOfState(storm::storage::sparse::state_type state) const;
57
64 void addLabelToState(std::string const& label, storm::storage::sparse::state_type state);
65
72 void removeLabelFromState(std::string const& label, storm::storage::sparse::state_type state);
73
81 bool getStateHasLabel(std::string const& label, storm::storage::sparse::state_type state) const;
82
89 storm::storage::BitVector const& getStates(std::string const& label) const;
90
97 void setStates(std::string const& label, storage::BitVector const& labeling);
98
105 void setStates(std::string const& label, storage::BitVector&& labeling);
106
107 friend std::ostream& operator<<(std::ostream& out, StateLabeling const& labeling);
108};
109
110} // namespace sparse
111} // namespace models
112} // namespace storm
A base class managing the labeling of items with a number of (atomic) labels.
This class manages the labeling of the state space with a number of (atomic) labels.
bool operator==(StateLabeling const &other) const
Checks whether the two labelings are equal.
friend std::ostream & operator<<(std::ostream &out, StateLabeling const &labeling)
bool getStateHasLabel(std::string const &label, storm::storage::sparse::state_type state) const
Checks whether a given state is labeled with the given label.
StateLabeling & operator=(StateLabeling const &other)=default
virtual bool isStateLabeling() const override
storm::storage::BitVector const & getStates(std::string const &label) const
Returns the labeling of states associated with the given label.
void addLabelToState(std::string const &label, storm::storage::sparse::state_type state)
Adds a label to a given state.
void removeLabelFromState(std::string const &label, storm::storage::sparse::state_type state)
Removes a label from a given state.
void setStates(std::string const &label, storage::BitVector const &labeling)
Sets the labeling of states associated with the given label.
StateLabeling(StateLabeling const &other)=default
std::set< std::string > getLabelsOfState(storm::storage::sparse::state_type state) const
Retrieves the set of labels attached to the given state.
StateLabeling getSubLabeling(storm::storage::BitVector const &states) const
Retrieves the sub labeling that represents the same labeling as the current one for all selected stat...
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
LabParser.cpp.
Definition cli.cpp:18