mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update libsolutil/LP.cpp
Co-authored-by: Bhargava Shastry <bhargava.shastry@ethereum.org>
This commit is contained in:
parent
f77f0ecae4
commit
a1ed2c0f09
@ -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; }));
|
||||||
|
Loading…
Reference in New Issue
Block a user