mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fix combining
This commit is contained in:
parent
594130dd50
commit
b1319eb3ee
@ -276,11 +276,10 @@ void LPSolver::combineSubProblems(size_t _combineInto, size_t _combineFrom)
|
|||||||
size_t varShift = combineInto.variables.size();
|
size_t varShift = combineInto.variables.size();
|
||||||
#ifdef SPARSE
|
#ifdef SPARSE
|
||||||
size_t rowShift = combineInto.factors.rows();
|
size_t rowShift = combineInto.factors.rows();
|
||||||
size_t colShift = combineInto.factors.columns();
|
|
||||||
|
|
||||||
for (size_t row = 0; row < combineFrom.factors.rows(); row++)
|
for (size_t row = 0; row < combineFrom.factors.rows(); row++)
|
||||||
for (auto&& entry: combineFrom.factors.iterateRow(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
|
#else
|
||||||
size_t rowShift = combineInto.factors.size();
|
size_t rowShift = combineInto.factors.size();
|
||||||
size_t newRowLength = combineInto.variables.size() + combineFrom.variables.size();
|
size_t newRowLength = combineInto.variables.size() + combineFrom.variables.size();
|
||||||
|
Loading…
Reference in New Issue
Block a user