Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DeterministicBlockData.cpp
Go to the documentation of this file.
2
3#include <iostream>
4
7
8namespace storm {
9namespace storage {
10namespace bisimulation {
11
13 // Intentionally left empty.
14}
15
16DeterministicBlockData::DeterministicBlockData(uint_fast64_t marker1, uint_fast64_t marker2)
17 : valMarker1(marker1), valMarker2(marker2), flags(0), valRepresentativeState() {
18 // Intentionally left empty.
19}
20
21uint_fast64_t DeterministicBlockData::marker1() const {
22 return valMarker1;
23}
24
25void DeterministicBlockData::setMarker1(uint_fast64_t newMarker1) {
26 valMarker1 = newMarker1;
27}
28
32
36
37uint_fast64_t DeterministicBlockData::marker2() const {
38 return valMarker2;
39}
40
41void DeterministicBlockData::setMarker2(uint_fast64_t newMarker2) {
42 valMarker2 = newMarker2;
43}
44
48
52
54 bool result = block.getBeginIndex() != this->valMarker1 || block.getBeginIndex() != this->valMarker2;
55 this->valMarker1 = this->valMarker2 = block.getBeginIndex();
56 return result;
57}
58
62
66
70
74
78
82
86
88 return static_cast<bool>(valRepresentativeState);
89}
90
92 STORM_LOG_THROW(valRepresentativeState, storm::exceptions::InvalidOperationException, "Unable to retrieve representative state for block.");
93 return valRepresentativeState.get();
94}
95
99
103
104bool DeterministicBlockData::getFlag(uint64_t flag) const {
105 return (this->flags & flag) != 0ull;
106}
107
108void DeterministicBlockData::setFlag(uint64_t flag, bool value) {
109 if (value) {
110 this->flags |= flag;
111 } else {
112 this->flags &= ~flag;
113 }
114}
115
116std::ostream& operator<<(std::ostream& out, DeterministicBlockData const& data) {
117 out << "m1: " << data.marker1() << ", m2: " << data.marker2() << ", r: " << data.hasRewards();
118 return out;
119}
120} // namespace bisimulation
121} // namespace storage
122} // namespace storm
storm::storage::sparse::state_type getBeginIndex() const
Definition Block.cpp:69
storm::storage::sparse::state_type representativeState() const
bool resetMarkers(Block< DeterministicBlockData > const &block)
This method needs to be called whenever the block was modified to reset the data of the change.
void setRepresentativeState(storm::storage::sparse::state_type representativeState)
boost::optional< storm::storage::sparse::state_type > valRepresentativeState
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
std::ostream & operator<<(std::ostream &out, DeterministicBlockData const &data)
LabParser.cpp.
Definition cli.cpp:18