Browse Source

Added convenience methods RewardModel::hasStateRewards() and RewardModel::hasTransitionRewards()

tempestpy_adaptions
gereon 12 years ago
parent
commit
d9e833680a
  1. 8
      src/ir/RewardModel.cpp
  2. 12
      src/ir/RewardModel.h

8
src/ir/RewardModel.cpp

@ -37,10 +37,18 @@ std::string RewardModel::toString() const {
return result.str();
}
bool RewardModel::hasStateRewards() const {
return this->stateRewards.size() > 0;
}
std::vector<storm::ir::StateReward> RewardModel::getStateRewards() const {
return this->stateRewards;
}
bool RewardModel::hasTransitionRewards() const {
return this->transitionRewards.size() > 0;
}
std::vector<storm::ir::TransitionReward> RewardModel::getTransitionRewards() const {
return this->transitionRewards;
}

12
src/ir/RewardModel.h

@ -42,12 +42,24 @@ public:
*/
std::string toString() const;
/*!
* Check, if there are any state rewards.
* @return True, iff there are any state rewards.
*/
bool hasStateRewards() const;
/*!
* Retrieve state rewards.
* @return State rewards.
*/
std::vector<storm::ir::StateReward> getStateRewards() const;
/*!
* Check, if there are any transition rewards.
* @return True, iff there are any transition rewards.
*/
bool hasTransitionRewards() const;
/*!
* Retrieve transition rewards.
* @return Transition rewards.

Loading…
Cancel
Save