double after = before - s;
luColj.setQuick(i, after); // LUcolj is a copy
lu.setQuick(i, j, after); // this is the original
if (sparse) {
if (before == 0 && after != 0) { // nasty bug fixed!
int pos = nonZeroIndexes.binarySearch(i);
pos = -pos - 1;
nonZeroIndexes.beforeInsert(pos, i);
}
if (before != 0 && after == 0) {
nonZeroIndexes.remove(nonZeroIndexes.binarySearch(i));