mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Apply suggestions from code review
Co-authored-by: Bhargava Shastry <bhargava.shastry@ethereum.org>
This commit is contained in:
parent
0225f366f5
commit
56546a1b57
@ -277,7 +277,7 @@ pair<LPResult, Tableau> simplexPhaseI(Tableau _tableau)
|
|||||||
|
|
||||||
LPResult result;
|
LPResult result;
|
||||||
tie(result, _tableau) = simplexEq(move(_tableau));
|
tie(result, _tableau) = simplexEq(move(_tableau));
|
||||||
solAssert(result == LPResult::Feasible || result == LPResult::Unbounded, "");
|
solAssert(result != LPResult::Infeasible, "");
|
||||||
|
|
||||||
vector<rational> optimum = solutionVector(_tableau);
|
vector<rational> optimum = solutionVector(_tableau);
|
||||||
|
|
||||||
@ -325,7 +325,7 @@ pair<LPResult, vector<rational>> simplex(vector<Constraint> _constraints, Linear
|
|||||||
// but it might not be optimal.
|
// but it might not be optimal.
|
||||||
LPResult result;
|
LPResult result;
|
||||||
tie(result, tableau) = simplexEq(move(tableau));
|
tie(result, tableau) = simplexEq(move(tableau));
|
||||||
solAssert(result == LPResult::Feasible || result == LPResult::Unbounded, "");
|
solAssert(result != LPResult::Infeasible, "");
|
||||||
return make_pair(result, solutionVector(tableau));
|
return make_pair(result, solutionVector(tableau));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user