You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/linspire.cpp
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -68,14 +68,14 @@ namespace linspire
68
68
assert(c != 0);
69
69
const utils::inf_rational c_right = utils::inf_rational(-expr.known_term) / c; // the right-hand side of the constraint is the division of the negation of the known term by the coefficient..
70
70
// we can set both the lower and upper bound of the variable to the right-hand side of the constraint..
const utils::inf_rational c_right = utils::inf_rational(-expr.known_term, strict ? -1 : 0) / c; // the right-hand side of the constraint is the division of the negation of the known term minus an infinitesimal by the coefficient..
107
107
if (is_positive(c))
108
-
returnreason ? set_ub(x, c_right, reason.value()) : set_ub(x, c_right); // we are in the case `c * v < c_right`..
108
+
returnset_ub(x, c_right, reason); // we are in the case `c * v < c_right`..
109
109
else
110
-
returnreason ? set_lb(x, c_right, reason.value()) : set_lb(x, c_right); // we are in the case `c * v > c_right`..
110
+
returnset_lb(x, c_right, reason); // we are in the case `c * v > c_right`..
111
111
}
112
112
default: // the expression is still a general linear expression..
0 commit comments