X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Fcone%2Fcompletely_positive.py;h=533c509012f6e0fd2e70ac0b989d22d09f34ffb0;hb=53179d0578a8a72bb606182d54871f623f3281cd;hp=ac5f14435713b4b524c53a2e1c73607ee004b323;hpb=9d1860e7730bde81574c1beca20fecd129002f84;p=sage.d.git diff --git a/mjo/cone/completely_positive.py b/mjo/cone/completely_positive.py index ac5f144..533c509 100644 --- a/mjo/cone/completely_positive.py +++ b/mjo/cone/completely_positive.py @@ -5,6 +5,8 @@ the set of all matrices `$A$`of the form `$\sum uu^{T}$` for `$u \in `$X$` are nonnegative. """ +from sage.all import * + # Sage doesn't load ~/.sage/init.sage during testing (sage -t), so we # have to explicitly mangle our sitedir here so that "mjo.cone" # resolves. @@ -30,6 +32,10 @@ def is_completely_positive(A): Either ``True`` if ``A`` is completely positive, or ``False`` otherwise. + SETUP:: + + sage: from mjo.cone.completely_positive import is_completely_positive + EXAMPLES: Generate an extreme completely positive matrix and check that we @@ -124,6 +130,10 @@ def is_extreme_completely_positive(A): 1. Berman, Abraham and Shaked-Monderer, Naomi. Completely Positive Matrices. World Scientific, 2003. + SETUP:: + + sage: from mjo.cone.completely_positive import is_extreme_completely_positive + EXAMPLES: Generate an extreme completely positive matrix and check that we