From 500a96ed7161c51f11269ea7c5c795e4f8cc9ba1 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sun, 17 Feb 2013 13:50:19 +0100 Subject: [PATCH] Remove obsolete reward model. --- src/reward/RewardModel.h | 79 ---------------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 src/reward/RewardModel.h diff --git a/src/reward/RewardModel.h b/src/reward/RewardModel.h deleted file mode 100644 index abf79f164..000000000 --- a/src/reward/RewardModel.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * RewardModel.h - * - * Created on: 25.10.2012 - * Author: Philipp Berger - */ - -#ifndef STORM_REWARD_REWARDMODEL_H_ -#define STORM_REWARD_REWARDMODEL_H_ - -#include - -#include "boost/integer/integer_mask.hpp" - -namespace storm { - -namespace reward { - -/*! This class represents a single reward model with a type DataClass value for each state contained in a Vector of type VectorImpl - */ -template class VectorImpl, class DataClass> -class RewardModel { - - //! Shorthand for a constant reference to the DataClass type - typedef const DataClass& crDataClass; - - public: - RewardModel(const uint_fast32_t state_count, const DataClass& null_value) : state_count(state_count), null_value(null_value) { - - this->reward_vector = new VectorImpl>(this->state_count); - // init everything to zero - for (uint_fast32_t i = 0; i < this->state_count; ++i) { - this->setReward(i, this->null_value); - } - } - - virtual ~RewardModel() { - delete reward_vector; - } - - bool setReward(const uint_fast32_t state_index, crDataClass reward) { - if (state_index < this->state_count) { - this->reward_vector->at(state_index) = reward; - // [state_index] = reward; - return true; - } - return false; - } - - crDataClass getReward(const uint_fast32_t state_index) { - if (state_index < this->state_count) { - return this->reward_vector->at(state_index); - } - return this->null_value; - } - - bool resetReward(const uint_fast32_t state_index) { - if (state_index < this->state_count) { - this->reward_vector[state_index] = this->null_value; - return true; - } - return false; - } - - uint_fast32_t getSize() const { - return this->state_count; - } - private: - uint_fast32_t state_count; - VectorImpl>* reward_vector; - const DataClass& null_value; - -}; - -} //namespace reward - -} //namespace storm - -#endif /* STORM_REWARD_REWARDMODEL_H_ */