Storm
A Modern Probabilistic Model Checker
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DistributionWithReward.cpp
Go to the documentation of this file.
2
4
6
7namespace storm {
8namespace storage {
9
10template<typename ValueType, typename StateType>
11DistributionWithReward<ValueType, StateType>::DistributionWithReward(ValueType const& reward) : Distribution<ValueType, StateType>(), reward(reward) {
12 // Intentionally left empty.
13}
14
15template<typename ValueType, typename StateType>
17 storm::utility::ConstantsComparator<ValueType> const& comparator) const {
18 if (this->reward != other.reward) {
19 return false;
20 }
21 return Distribution<ValueType, StateType>::equals(other, comparator);
22}
23
24template<typename ValueType, typename StateType>
26 storm::utility::ConstantsComparator<ValueType> const& comparator) const {
27 if (comparator.isLess(this->reward, other.reward)) {
28 return true;
29 } else if (comparator.isLess(other.reward, this->reward)) {
30 return false;
31 } else {
32 return Distribution<ValueType, StateType>::less(other, comparator);
33 }
34}
35
36template<typename ValueType, typename StateType>
38 this->reward = reward;
39}
40
41template<typename ValueType, typename StateType>
43 return reward;
44}
45
47
48#ifdef STORM_HAVE_CARL
51#endif
52
53} // namespace storage
54} // namespace storm
bool less(Distribution< ValueType, StateType > const &other, storm::utility::ConstantsComparator< ValueType > const &comparator) const
bool equals(Distribution< ValueType, StateType > const &other, storm::utility::ConstantsComparator< ValueType > const &comparator=storm::utility::ConstantsComparator< ValueType >()) const
Checks whether the two distributions specify the same probabilities to go to the same states.
bool equals(DistributionWithReward< ValueType, StateType > const &other, storm::utility::ConstantsComparator< ValueType > const &comparator=storm::utility::ConstantsComparator< ValueType >()) const
Checks whether the two distributions specify the same probabilities to go to the same states.
DistributionWithReward(ValueType const &reward=storm::utility::zero< ValueType >())
Creates an empty distribution.
ValueType const & getReward() const
Retrieves the reward of this distribution.
bool less(DistributionWithReward< ValueType, StateType > const &other, storm::utility::ConstantsComparator< ValueType > const &comparator) const
void setReward(ValueType const &reward)
Sets the reward of this distribution.
bool isLess(ValueType const &value1, ValueType const &value2) const
LabParser.cpp.
Definition cli.cpp:18