Learn R Programming

CVXR (version 0.99-7)

==,Expression,Expression-method: The EqConstraint class.

Description

This class represents a equality constraint.

Usage

# S4 method for Expression,Expression
==(e1, e2)

# S4 method for Expression,ConstVal ==(e1, e2)

# S4 method for ConstVal,Expression ==(e1, e2)

EqConstraint(lh_exp, rh_exp)

# S4 method for EqConstraint is_dcp(object)

# S4 method for EqConstraint residual(object)

# S4 method for EqConstraint canonicalize(object)

Arguments

e1, e2

The '>Expression objects or numeric constants to compare.

lh_exp

An '>Expression, numeric element, vector, or matrix representing the left-hand side of the inequality.

rh_exp

An '>Expression, numeric element, vector, or matrix representing the right-hand side of the inequality.

object

An '>EqConstraint object.

Methods (by generic)

  • is_dcp: The constraint is DCP if the left-hand and right-hand expressions are affine.

  • residual: The absolute value of the left-hand minus the right-hand expression, i.e. abs(lh_exp - rh_exp).

  • 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 '>EqConstraint.

Slots

constr_id

(Internal) A unique integer identification number used internally.

lh_exp

An '>Expression, numeric element, vector, or matrix representing the left-hand side of the inequality.

rh_exp

An '>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.