Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
RewardAccumulation.cpp
Go to the documentation of this file.
2#include <ostream>
3
4namespace storm {
5namespace logic {
6
7RewardAccumulation::RewardAccumulation(bool steps, bool time, bool exit) : time(time), steps(steps), exit(exit) {
8 // Intentionally left empty
9}
10
12 return steps;
13}
14
16 return time;
17}
18
20 return exit;
21}
22
24 return !isStepsSet() && !isTimeSet() && !isExitSet();
25}
26
27uint64_t RewardAccumulation::size() const {
28 return (isStepsSet() ? 1 : 0) + (isTimeSet() ? 1 : 0) + (isExitSet() ? 1 : 0);
29}
30
31std::ostream& operator<<(std::ostream& out, RewardAccumulation const& acc) {
32 bool hasEntry = false;
33 if (acc.isStepsSet()) {
34 out << "steps";
35 hasEntry = true;
36 }
37 if (acc.isTimeSet()) {
38 if (hasEntry) {
39 out << ", ";
40 }
41 out << "time";
42 hasEntry = true;
43 }
44 if (acc.isExitSet()) {
45 if (hasEntry) {
46 out << ", ";
47 }
48 out << "exit";
49 hasEntry = true;
50 }
51
52 return out;
53}
54
55} // namespace logic
56} // namespace storm
RewardAccumulation(bool steps, bool time, bool exit)
std::ostream & operator<<(std::ostream &out, Bound const &bound)
Definition Bound.h:40
LabParser.cpp.
Definition cli.cpp:18