diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index 228fb4604..365535951 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -1754,6 +1754,7 @@ namespace storm { template void SparseMatrix::multiplyAndReduceForward(OptimizationDirection const& dir, std::vector const& rowGroupIndices, std::vector const& vector, std::vector const* summand, std::vector& result, std::vector* choices, storm::storage::BitVector const* dirOverride) const { + std::cout << *dirOverride << std::endl; if(dirOverride && !dirOverride->empty()) { if (dir == OptimizationDirection::Minimize) { multiplyAndReduceForward, true>(rowGroupIndices, vector, summand, result, choices, dirOverride); @@ -1848,11 +1849,11 @@ namespace storm { // Finally write value to target vector. *resultIt = currentValue; if(dirOverridden) { - if (choices && dirOverride->get(currentRowGroup) ? compare(oldSelectedChoiceValue, currentValue) : compare(currentValue, oldSelectedChoiceValue)) { + if (choices && (dirOverride->get(currentRowGroup) ? compare(oldSelectedChoiceValue, currentValue) : compare(currentValue, oldSelectedChoiceValue))) { *choiceIt = selectedChoice; } } else { - if (choices && compare(currentValue, oldSelectedChoiceValue)) { + if (choices && (compare(currentValue, oldSelectedChoiceValue))) { *choiceIt = selectedChoice; } } @@ -2129,8 +2130,7 @@ namespace storm { } else { target = &result; } - - this->multiplyAndReduceForward(dir, rowGroupIndices, vector, summand, *target, choices); + this->multiplyAndReduceForward(dir, rowGroupIndices, vector, summand, *target, choices, dirOverride); if (target == &temporary) { std::swap(temporary, result);