This class represents a \(\leq\) inequality constraint.
# S4 method for Expression,Expression
<=(e1, e2)# S4 method for Expression,ConstVal
<=(e1, e2)
# S4 method for ConstVal,Expression
<=(e1, e2)
# S4 method for Expression,Expression
<(e1, e2)
# S4 method for Expression,ConstVal
<(e1, e2)
# S4 method for ConstVal,Expression
<(e1, e2)
# S4 method for Expression,Expression
>=(e1, e2)
# S4 method for Expression,ConstVal
>=(e1, e2)
# S4 method for ConstVal,Expression
>=(e1, e2)
# S4 method for Expression,Expression
>(e1, e2)
# S4 method for Expression,ConstVal
>(e1, e2)
# S4 method for ConstVal,Expression
>(e1, e2)
LeqConstraint(lh_exp, rh_exp)
# S4 method for LeqConstraint
as.character(x)
# S4 method for LeqConstraint
id(object)
# S4 method for LeqConstraint
size(object)
# S4 method for LeqConstraint
is_dcp(object)
# S4 method for LeqConstraint
canonicalize(object)
# S4 method for LeqConstraint
variables(object)
# S4 method for LeqConstraint
parameters(object)
# S4 method for LeqConstraint
constants(object)
# S4 method for LeqConstraint
residual(object)
# S4 method for LeqConstraint
value(object)
# S4 method for LeqConstraint
violation(object)
id: The constr_id of the constraint.
size: The size of the left-hand expression minus the right-hand expression.
is_dcp: The constraint is DCP if the left-hand expression is convex and the right-hand expression is concave.
canonicalize: The graph implementation of the object. Marks the top level constraint as the dual_holder so the dual value will be saved to the '>LeqConstraint.
residual: The elementwise maximum of the left-hand expression minus the right-hand expression, i.e. max_elemwise(lh_exp - rh_exp, 0).
value: A logical value indicating whether the constraint holds. Tolerance is currently set at 1e-4.
violation: A matrix representing the amount by which the constraint is off, i.e. the numeric value of the residual expression.
constr_id(Internal) A unique integer identification number used internally.
lh_expAn '>Expression, numeric element, vector, or matrix representing the left-hand side of the inequality.
rh_expAn '>Expression, numeric element, vector, or matrix representing the right-hand side of the inequality.
args(Internal) A list that holds lh_exp and rh_exp for internal use.
.expr(Internal) An '>Expression representing lh_exp - rh_exp for internal use.
dual_variable(Internal) A '>Variable representing the dual variable associated with the constraint.