]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/cone/doubly_nonnegative.py
mjo/cone: rename random_psd() to random_symmetric_psd().
[sage.d.git] / mjo / cone / doubly_nonnegative.py
index 92184d15c4133e33f04e877352787378ae3739df..a30a827d158f3b99d7d9df5d295096e7cc349e0f 100644 (file)
@@ -13,7 +13,9 @@ It is represented typically by either `\mathcal{D}^{n}` or
 
 from sage.all import *
 
-from mjo.cone.symmetric_psd import factor_psd, is_symmetric_psd, random_psd
+from mjo.cone.symmetric_psd import (factor_psd,
+                                    is_symmetric_psd,
+                                    random_symmetric_psd)
 from mjo.matrix_vector import isomorphism
 
 
@@ -458,10 +460,10 @@ def random_doubly_nonnegative(V, accept_zero=True, rank=None):
 
     # Generate random symmetric positive-semidefinite matrices until
     # one of them is nonnegative, then return that.
-    A = random_psd(V, accept_zero, rank)
+    A = random_symmetric_psd(V, accept_zero, rank)
 
     while not all( x >= 0 for x in A.list() ):
-        A = random_psd(V, accept_zero, rank)
+        A = random_symmetric_psd(V, accept_zero, rank)
 
     return A