There are three types of symmetric cones supported by CVXOPT:
- * The nonnegative orthant in the real n-space.
-
- * The Lorentz "ice cream" cone, or the second-order cone.
-
- * The cone of symmetric positive-semidefinite matrices.
+ 1. The nonnegative orthant in the real n-space.
+ 2. The Lorentz "ice cream" cone, or the second-order cone.
+ 3. The cone of symmetric positive-semidefinite matrices.
This class is intended to encompass them all.
"""
product of them), the only information that we need is its
dimension. We take that dimension as a parameter, and store it
for later.
+
+ INPUT:
+
+ - ``dimension`` -- the dimension of this cone.
+
"""
if dimension <= 0:
raise ValueError('cones must have dimension greater than zero')
def __contains__(self, point):
"""
Return whether or not ``point`` belongs to this cone.
+
+ EXAMPLES:
+
+ >>> K = SymmetricCone(5)
+ >>> matrix([1,2]) in K
+ Traceback (most recent call last):
+ ...
+ NotImplementedError
+
"""
raise NotImplementedError
"""
Return whether or not ``point`` belongs to the interior
of this cone.
+
+ EXAMPLES:
+
+ >>> K = SymmetricCone(5)
+ >>> K.contains_strict(matrix([1,2]))
+ Traceback (most recent call last):
+ ...
+ NotImplementedError
"""
raise NotImplementedError
should not need to be overridden in subclasses. We prefer to do
any special computation in ``__init__()`` and record the result
in ``self._dimension``.
+
+ EXAMPLES:
+
+ >>> K = SymmetricCone(5)
+ >>> K.dimension()
+ 5
+
"""
return self._dimension