Browse Source

small changes to fit to the GameViHelper.*

tempestpy_adaptions
Lukas Posch 3 years ago
committed by Stefan Pranger
parent
commit
6289788a68
  1. 6
      src/storm/modelchecker/rpatl/helper/internal/BoundedGloballyGameViHelper.cpp
  2. 4
      src/storm/modelchecker/rpatl/helper/internal/BoundedGloballyGameViHelper.h

6
src/storm/modelchecker/rpatl/helper/internal/BoundedGloballyGameViHelper.cpp

@ -60,12 +60,12 @@ namespace storm {
} }
template <typename ValueType> template <typename ValueType>
void BoundedGloballyGameViHelper<ValueType>::fillResultVector(std::vector<ValueType>& result, storm::storage::BitVector psiStates)
void BoundedGloballyGameViHelper<ValueType>::fillResultVector(std::vector<ValueType>& result, storm::storage::BitVector relevantStates)
{ {
std::vector<ValueType> filledVector = std::vector<ValueType>(psiStates.size(), storm::utility::zero<ValueType>());
std::vector<ValueType> filledVector = std::vector<ValueType>(relevantStates.size(), storm::utility::zero<ValueType>());
uint bitIndex = 0; uint bitIndex = 0;
for(uint i = 0; i < filledVector.size(); i++) { for(uint i = 0; i < filledVector.size(); i++) {
if (psiStates.get(i)) {
if (relevantStates.get(i)) {
filledVector.at(i) = result.at(bitIndex); filledVector.at(i) = result.at(bitIndex);
bitIndex++; bitIndex++;
} }

4
src/storm/modelchecker/rpatl/helper/internal/BoundedGloballyGameViHelper.h

@ -26,9 +26,9 @@ namespace storm {
void performValueIteration(Environment const& env, std::vector<ValueType>& x, storm::solver::OptimizationDirection const dir, uint64_t upperBound, std::vector<ValueType>& constrainedChoiceValues); void performValueIteration(Environment const& env, std::vector<ValueType>& x, storm::solver::OptimizationDirection const dir, uint64_t upperBound, std::vector<ValueType>& constrainedChoiceValues);
/*! /*!
* Fills the result vector to the original size with ones for being psiStates, zeros for being not phiStates
* Fills the result vector to the original size with zeros for all states except the relevantStates
*/ */
void fillResultVector(std::vector<ValueType>& result, storm::storage::BitVector psiStates);
void fillResultVector(std::vector<ValueType>& result, storm::storage::BitVector relevantStates);
/*! /*!
* Fills the choice values vector to the original size with zeros for ~psiState choices. * Fills the choice values vector to the original size with zeros for ~psiState choices.

Loading…
Cancel
Save