picos.expressions.cone_psd¶
Implements the positive semidefinite cone.
Classes
- class picos.expressions.cone_psd.PositiveSemidefiniteCone(dim=None)[source]¶
Bases:
Cone
The positive semidefinite cone.
Unlike other
cones
which are defined only on, this cone accepts both symmetric and hermitian matrices as well as their
special vectorization
as members.- Example
>>> from picos import Constant, PositiveSemidefiniteCone >>> R = Constant("R", range(16), (4, 4)) >>> S = R + R.T >>> S.shape (4, 4) >>> S.svec.shape (10, 1) >>> S.svec << PositiveSemidefiniteCone() # Constrain the matrix via svec(). <4×4 LMI Constraint: R + Rᵀ ≽ 0> >>> C = S << PositiveSemidefiniteCone(); C # Constrain the matrix directly. <4×4 LMI Constraint: R + Rᵀ ≽ 0> >>> C.conic_membership_form[0] # The conic form still refers to svec(). <10×1 Real Constant: svec(R + Rᵀ)> >>> C.conic_membership_form[1] <10-dim. Positive Semidefinite Cone: {svec(A) : xᵀ·A·x ≥ 0 ∀ x}>
- __init__(dim=None)[source]¶
Construct a
PositiveSemidefiniteCone
.If a fixed dimensionality is given, this must be the dimensiona of the special vectorization. For a
matrix, this is
.
- property dual_cone¶
Implement
cone.Cone.dual_cone
.