|
|
@ -67,6 +67,20 @@ namespace storm { |
|
|
|
this->optionalStateRewardVector.get()[state] = newReward; |
|
|
|
} |
|
|
|
|
|
|
|
// template<typename ValueType>
|
|
|
|
// ValueType StandardRewardModel<ValueType>::maximalStateReward(uint_fast64_t state) const {
|
|
|
|
// assert(this->hasStateRewards());
|
|
|
|
// assert(!this->optionalStateRewardVector.get().empty());
|
|
|
|
// ValueType max = *(this->optionalStateRewardVector.get().begin());
|
|
|
|
// for(auto const& entry : this->optionalStateRewardVector.get()) {
|
|
|
|
// if(entry > max) {
|
|
|
|
// max = entry;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// return max;
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
bool StandardRewardModel<ValueType>::hasStateActionRewards() const { |
|
|
|
return static_cast<bool>(this->optionalStateActionRewardVector); |
|
|
@ -99,6 +113,19 @@ namespace storm { |
|
|
|
this->optionalStateActionRewardVector.get()[choiceIndex] = newValue; |
|
|
|
} |
|
|
|
|
|
|
|
// template<typename ValueType>
|
|
|
|
// ValueType StandardRewardModel<ValueType>::maximalStateActionReward() const {
|
|
|
|
// assert(this->hasStateActionRewards());
|
|
|
|
// assert(!this->optionalStateActionRewardVector.get().empty());
|
|
|
|
// ValueType max = *(this->optionalStateActionRewardVector.get().begin());
|
|
|
|
// for(auto const& entry : this->optionalStateActionRewardVector.get()) {
|
|
|
|
// if(entry > max) {
|
|
|
|
// max = entry;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// return max;
|
|
|
|
// }
|
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
boost::optional<std::vector<ValueType>> const& StandardRewardModel<ValueType>::getOptionalStateActionRewardVector() const { |
|
|
|
return this->optionalStateActionRewardVector; |