From b1319eb3ee8a4f8e5caada4faa43d3ef9ef40e3b Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 22 Aug 2022 14:19:20 +0200 Subject: [PATCH] fix combining --- libsolutil/LP.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libsolutil/LP.cpp b/libsolutil/LP.cpp index a51592fcd..56d5aa24c 100644 --- a/libsolutil/LP.cpp +++ b/libsolutil/LP.cpp @@ -276,11 +276,10 @@ void LPSolver::combineSubProblems(size_t _combineInto, size_t _combineFrom) size_t varShift = combineInto.variables.size(); #ifdef SPARSE size_t rowShift = combineInto.factors.rows(); - size_t colShift = combineInto.factors.columns(); for (size_t row = 0; row < combineFrom.factors.rows(); row++) for (auto&& entry: combineFrom.factors.iterateRow(row)) - combineInto.factors.entry(entry.row + rowShift, entry.col + colShift).value = move(entry.value); + combineInto.factors.entry(entry.row + rowShift, entry.col + varShift).value = move(entry.value); #else size_t rowShift = combineInto.factors.size(); size_t newRowLength = combineInto.variables.size() + combineFrom.variables.size();