]> gitweb.michael.orlitzky.com - dunshire.git/blobdiff - src/dunshire/cones.py
Fix SymmetricPSD documentation and add the column-major vec() function.
[dunshire.git] / src / dunshire / cones.py
index b1e07e9d6c607c823334aecb74ea774cb073bf35..2609b16eea729651c7d005c226d5f47ab4cd616c 100644 (file)
@@ -316,13 +316,24 @@ class IceCream(SymmetricCone):
 
 class SymmetricPSD(SymmetricCone):
     """
-    The nonnegative orthant in ``n`` dimensions.
+    The cone of real symmetric positive-semidefinite matrices.
+
+    This cone has a dimension ``n`` associated with it, but we let ``n``
+    refer to the dimension of the domain of our matrices and not the
+    dimension of the (much larger) space in which the matrices
+    themselves live. In other words, our ``n`` is the ``n`` that appears
+    in the usual notation `S^{n}` for symmetric matrices.
+
+    As a result, the cone ``SymmetricPSD(n)`` lives in a space of dimension
+    ``(n**2 + n)/2)``.
 
     EXAMPLES:
 
         >>> K = SymmetricPSD(3)
         >>> print(K)
         Cone of symmetric positive-semidefinite matrices on the real 3-space
+        >>> K.dimension()
+        3
 
     """
     def __str__(self):