Browse Source

missed files

Former-commit-id: 9a7f1ac4a9
tempestpy_adaptions
sjunges 9 years ago
parent
commit
a07c2cacc4
  1. 15
      src/models/sparse/StandardRewardModel.cpp
  2. 4
      src/models/sparse/StandardRewardModel.h

15
src/models/sparse/StandardRewardModel.cpp

@ -58,7 +58,15 @@ namespace storm {
assert(state < this->optionalStateRewardVector.get().size());
return this->optionalStateRewardVector.get()[state];
}
template<typename ValueType>
template<typename T>
void StandardRewardModel<ValueType>::setStateReward(uint_fast64_t state, T const & newReward) {
assert(this->hasStateRewards());
assert(state < this->optionalStateRewardVector.get().size());
this->optionalStateRewardVector.get()[state] = newReward;
}
template<typename ValueType>
bool StandardRewardModel<ValueType>::hasStateActionRewards() const {
return static_cast<bool>(this->optionalStateActionRewardVector);
@ -267,6 +275,7 @@ namespace storm {
template std::vector<double> StandardRewardModel<double>::getTotalRewardVector(storm::storage::SparseMatrix<double> const& transitionMatrix, std::vector<double> const& weights) const;
template void StandardRewardModel<double>::reduceToStateBasedRewards(storm::storage::SparseMatrix<double> const& transitionMatrix, bool reduceToStateRewards);
template void StandardRewardModel<double>::setStateActionReward(uint_fast64_t choiceIndex, double const & newValue);
template void StandardRewardModel<double>::setStateReward(uint_fast64_t state, double const & newValue);
template class StandardRewardModel<double>;
template std::ostream& operator<<<double>(std::ostream& out, StandardRewardModel<double> const& rewardModel);
@ -275,6 +284,7 @@ namespace storm {
template std::vector<float> StandardRewardModel<float>::getTotalRewardVector(storm::storage::SparseMatrix<float> const& transitionMatrix, std::vector<float> const& weights) const;
template void StandardRewardModel<float>::reduceToStateBasedRewards(storm::storage::SparseMatrix<float> const& transitionMatrix, bool reduceToStateRewards);
template void StandardRewardModel<float>::setStateActionReward(uint_fast64_t choiceIndex, float const & newValue);
template void StandardRewardModel<float>::setStateReward(uint_fast64_t state, float const & newValue);
template class StandardRewardModel<float>;
template std::ostream& operator<<<float>(std::ostream& out, StandardRewardModel<float> const& rewardModel);
@ -284,6 +294,7 @@ namespace storm {
template std::vector<storm::RationalFunction> StandardRewardModel<storm::RationalFunction>::getTotalRewardVector(storm::storage::SparseMatrix<storm::RationalFunction> const& transitionMatrix, std::vector<storm::RationalFunction> const& weights) const;
template void StandardRewardModel<storm::RationalFunction>::reduceToStateBasedRewards(storm::storage::SparseMatrix<storm::RationalFunction> const& transitionMatrix, bool reduceToStateRewards);
template void StandardRewardModel<storm::RationalFunction>::setStateActionReward(uint_fast64_t choiceIndex, storm::RationalFunction const & newValue);
template void StandardRewardModel<storm::RationalFunction>::setStateReward(uint_fast64_t state, storm::RationalFunction const & newValue);
template class StandardRewardModel<storm::RationalFunction>;
template std::ostream& operator<<<storm::RationalFunction>(std::ostream& out, StandardRewardModel<storm::RationalFunction> const& rewardModel);
@ -292,6 +303,8 @@ namespace storm {
template std::vector<storm::Interval> StandardRewardModel<storm::Interval>::getTotalRewardVector(storm::storage::SparseMatrix<double> const& transitionMatrix, std::vector<double> const& weights) const;
template void StandardRewardModel<storm::Interval>::setStateActionReward(uint_fast64_t choiceIndex, double const & newValue);
template void StandardRewardModel<storm::Interval>::setStateActionReward(uint_fast64_t choiceIndex, storm::Interval const & newValue);
template void StandardRewardModel<storm::Interval>::setStateReward(uint_fast64_t state, double const & newValue);
template void StandardRewardModel<storm::Interval>::setStateReward(uint_fast64_t state, storm::Interval const & newValue);
template void StandardRewardModel<storm::Interval>::reduceToStateBasedRewards(storm::storage::SparseMatrix<double> const& transitionMatrix, bool reduceToStateRewards);
template class StandardRewardModel<storm::Interval>;
template std::ostream& operator<<<storm::Interval>(std::ostream& out, StandardRewardModel<storm::Interval> const& rewardModel);

4
src/models/sparse/StandardRewardModel.h

@ -76,7 +76,9 @@ namespace storm {
std::vector<ValueType>& getStateRewardVector();
ValueType const& getStateReward(uint_fast64_t state) const;
template<typename T>
void setStateReward(uint_fast64_t state, T const& newReward);
/*!
* Retrieves an optional value that contains the state reward vector if there is one.
*

Loading…
Cancel
Save