Update libsolutil/LP.cpp

Co-authored-by: Bhargava Shastry <bhargava.shastry@ethereum.org>
This commit is contained in:
chriseth 2022-03-01 12:38:48 +01:00
parent f77f0ecae4
commit a1ed2c0f09

View File

@ -74,7 +74,7 @@ struct Tableau
/// Adds slack variables to remove non-equality costraints from a set of constraints /// Adds slack variables to remove non-equality costraints from a set of constraints
/// and returns the data part of the tableau / constraints. /// and returns the data part of the tableau / constraints.
/// The second return variable is true if a the original input had any equality constraints. /// The second return variable is true if the original input had any equality constraints.
pair<vector<LinearExpression>, bool> toEquationalForm(vector<Constraint> _constraints) pair<vector<LinearExpression>, bool> toEquationalForm(vector<Constraint> _constraints)
{ {
size_t varsNeeded = static_cast<size_t>(ranges::count_if(_constraints, [](Constraint const& _c) { return !_c.equality; })); size_t varsNeeded = static_cast<size_t>(ranges::count_if(_constraints, [](Constraint const& _c) { return !_c.equality; }));