From 2064cbb0a9e49060c0991818dfc5e98f9c507d1c Mon Sep 17 00:00:00 2001 From: lukpo Date: Fri, 13 Aug 2021 15:41:26 +0200 Subject: [PATCH] fix for the NativeMultiplier in case of having coalitionStates (games) --- src/storm/storage/SparseMatrix.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);