diff --git a/src/ir/RewardModel.cpp b/src/ir/RewardModel.cpp index bd3ce1e16..d6611e4ec 100644 --- a/src/ir/RewardModel.cpp +++ b/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 RewardModel::getStateRewards() const { return this->stateRewards; } +bool RewardModel::hasTransitionRewards() const { + return this->transitionRewards.size() > 0; +} + std::vector RewardModel::getTransitionRewards() const { return this->transitionRewards; } diff --git a/src/ir/RewardModel.h b/src/ir/RewardModel.h index 5cd7f2767..cb538f173 100644 --- a/src/ir/RewardModel.h +++ b/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 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.