R/generics.R
, R/expressions.R
, R/constraints.R
PSDConstraint-class.Rd
This class represents the positive semidefinite constraint, \(\frac{1}{2}(X + X^T) \succeq 0\), i.e. \(z^T(X + X^T)z \geq 0\) for all \(z\).
e1 %>>% e2
e1 %<<% e2
# S4 method for class 'Expression,Expression'
e1 %>>% e2
# S4 method for class 'Expression,ConstVal'
e1 %>>% e2
# S4 method for class 'ConstVal,Expression'
e1 %>>% e2
# S4 method for class 'Expression,Expression'
e1 %<<% e2
# S4 method for class 'Expression,ConstVal'
e1 %<<% e2
# S4 method for class 'ConstVal,Expression'
e1 %<<% e2
PSDConstraint(expr, id = NA_integer_)
# S4 method for class 'PSDConstraint'
name(x)
# S4 method for class 'PSDConstraint'
is_dcp(object)
# S4 method for class 'PSDConstraint'
is_dgp(object)
# S4 method for class 'PSDConstraint'
residual(object)
# S4 method for class 'PSDConstraint'
canonicalize(object)
The Expression objects or numeric constants to compare.
An Expression, numeric element, vector, or matrix representing \(X\).
(Optional) A numeric value representing the constraint ID.
A PSDConstraint object.
name(PSDConstraint)
: The string representation of the constraint.
is_dcp(PSDConstraint)
: The constraint is DCP if the left-hand and right-hand expressions are affine.
is_dgp(PSDConstraint)
: Is the constraint DGP?
residual(PSDConstraint)
: A Expression representing the residual of the constraint.
canonicalize(PSDConstraint)
: The graph implementation of the object. Marks the top level constraint as the dual_holder
so the dual value will be saved to the PSDConstraint.
expr
An Expression, numeric element, vector, or matrix representing \(X\).