Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
RewardAccumulation.cpp
Go to the documentation of this file.
1
#include "
storm/logic/RewardAccumulation.h
"
2
#include <ostream>
3
4
namespace
storm
{
5
namespace
logic {
6
7
RewardAccumulation::RewardAccumulation
(
bool
steps,
bool
time,
bool
exit) : time(time), steps(steps), exit(exit) {
8
// Intentionally left empty
9
}
10
11
bool
RewardAccumulation::isStepsSet
()
const
{
12
return
steps;
13
}
14
15
bool
RewardAccumulation::isTimeSet
()
const
{
16
return
time;
17
}
18
19
bool
RewardAccumulation::isExitSet
()
const
{
20
return
exit;
21
}
22
23
bool
RewardAccumulation::isEmpty
()
const
{
24
return
!
isStepsSet
() && !
isTimeSet
() && !
isExitSet
();
25
}
26
27
uint64_t
RewardAccumulation::size
()
const
{
28
return
(
isStepsSet
() ? 1 : 0) + (
isTimeSet
() ? 1 : 0) + (
isExitSet
() ? 1 : 0);
29
}
30
31
std::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.h
storm::logic::RewardAccumulation
Definition
RewardAccumulation.h:8
storm::logic::RewardAccumulation::RewardAccumulation
RewardAccumulation(bool steps, bool time, bool exit)
Definition
RewardAccumulation.cpp:7
storm::logic::RewardAccumulation::isStepsSet
bool isStepsSet() const
Definition
RewardAccumulation.cpp:11
storm::logic::RewardAccumulation::size
uint64_t size() const
Definition
RewardAccumulation.cpp:27
storm::logic::RewardAccumulation::isEmpty
bool isEmpty() const
Definition
RewardAccumulation.cpp:23
storm::logic::RewardAccumulation::isExitSet
bool isExitSet() const
Definition
RewardAccumulation.cpp:19
storm::logic::RewardAccumulation::isTimeSet
bool isTimeSet() const
Definition
RewardAccumulation.cpp:15
storm::logic::operator<<
std::ostream & operator<<(std::ostream &out, Bound const &bound)
Definition
Bound.h:40
storm
LabParser.cpp.
Definition
cli.cpp:18
src
storm
logic
RewardAccumulation.cpp
Generated by
1.9.8