From 4d53dc49301608f68e6e6dc42273943dda9ee299 Mon Sep 17 00:00:00 2001 From: TimQu Date: Thu, 3 Nov 2016 14:11:48 +0100 Subject: [PATCH] Fix in SparseMatrix::swapRows Former-commit-id: 40e2d890d4517fe8187200a8b71b6a9b462faa1e [formerly f46095e877109a553a1588c8916716c61622e976] Former-commit-id: 61fcf545cb82952cbfd9b9e1eb04c829fa12e864 --- src/storage/SparseMatrix.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/storage/SparseMatrix.cpp b/src/storage/SparseMatrix.cpp index 401fc4082..1792ae5e9 100644 --- a/src/storage/SparseMatrix.cpp +++ b/src/storage/SparseMatrix.cpp @@ -688,6 +688,9 @@ namespace storm { *writeIt = std::move(intermediateRowEntry); ++writeIt; } + } else { + // skip the intermediate rows + writeIt = getRow(smallerRow).begin(); } // Write the larger row to its new position. @@ -720,6 +723,9 @@ namespace storm { *writeIt = std::move(*intermediateRowEntryIt); --writeIt; } + } else { + // skip the intermediate rows + writeIt = getRow(smallerRow).end() - 1; } // Write the larger row to its new position.