Small opt in pivot.

This commit is contained in:
chriseth 2022-04-01 13:14:40 +02:00
parent 0b6e16983a
commit 0592b6d86a

View File

@ -203,6 +203,8 @@ void performPivot(Tableau& _tableau, size_t _pivotRow, size_t _pivotColumn)
auto subtractMultipleOfPivotRow = [&](LinearExpression& _row) {
if (_row[_pivotColumn] == rational{1})
_row -= _pivotRowData;
else if (_row[_pivotColumn] == rational{-1})
_row += _pivotRowData;
else if (_row[_pivotColumn])
_row -= _row[_pivotColumn] * _pivotRowData;
};