/* * RewardModel.cpp * * Created on: 12.01.2013 * Author: Christian Dehnert */ #include "RewardModel.h" #include namespace storm { namespace ir { // Initializes all members with their default constructors. RewardModel::RewardModel() : rewardModelName(), stateRewards(), transitionRewards() { // Nothing to do here. } // Initializes all members according to the given values. RewardModel::RewardModel(std::string rewardModelName, std::vector stateRewards, std::vector transitionRewards) : rewardModelName(rewardModelName), stateRewards(stateRewards), transitionRewards(transitionRewards) { // Nothing to do here. } // Build a string representation of the reward model. std::string RewardModel::toString() const { std::stringstream result; result << "rewards \"" << rewardModelName << "\"" << std::endl; for (auto reward : stateRewards) { result << reward.toString() << std::endl; } for (auto reward : transitionRewards) { result << reward.toString() << std::endl; } result << "endrewards" << std::endl; return result.str(); } std::vector RewardModel::getStateRewards() const { return this->stateRewards; } std::vector RewardModel::getTransitionRewards() const { return this->transitionRewards; } } // namespace ir } // namespace storm