]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/cone/schur.py
cone/nonnegative_orthant.py: add a word to the docs.
[sage.d.git] / mjo / cone / schur.py
index 3903b2bc8e346aa824c93d5acb14ad5efa6613de..53607a948ef26a3cb9f5fae2d86c8d895a4fab71 100644 (file)
@@ -19,6 +19,11 @@ def schur_cone(n):
 
     REFERENCES:
 
+    .. [GourionSeeger] Daniel Gourion and Alberto Seeger.
+       Critical angles in polyhedral convex cones: numerical and
+       statistical considerations. Mathematical Programming, 123:173-198,
+       2010, doi:10.1007/s10107-009-0317-2.
+
     .. [IusemSeegerOnPairs] Alfredo Iusem and Alberto Seeger.
        On pairs of vectors achieving the maximal angle of a convex cone.
        Mathematical Programming, 104(2-3):501-523, 2005,
@@ -40,13 +45,24 @@ def schur_cone(n):
 
         sage: P = schur_cone(5)
         sage: Q = nonnegative_orthant(5)
-        sage: G = [ g.change_ring(QQbar).normalized() for g in P ]
-        sage: H = [ h.change_ring(QQbar).normalized() for h in Q ]
-        sage: actual = max([arccos(u.inner_product(v)) for u in G for v in H])
+        sage: G = ( g.change_ring(QQbar).normalized() for g in P )
+        sage: H = ( h.change_ring(QQbar).normalized() for h in Q )
+        sage: actual = max(arccos(u.inner_product(v)) for u in G for v in H)
         sage: expected = 3*pi/4
         sage: abs(actual - expected).n() < 1e-12
         True
 
+    The dual of the Schur cone is the "downward monotonic cone"
+    [GourionSeeger]_, whose elements' entries are in non-increasing
+    order::
+
+        sage: set_random_seed()
+        sage: n = ZZ.random_element(10)
+        sage: K = schur_cone(n).dual()
+        sage: x = K.random_element()
+        sage: all( x[i] >= x[i+1] for i in xrange(n-1) )
+        True
+
     TESTS:
 
     We get the trivial cone when ``n`` is zero::
@@ -59,7 +75,7 @@ def schur_cone(n):
         sage: set_random_seed()
         sage: def majorized_by(x,y):
         ....:     return (all(sum(x[0:i]) <= sum(y[0:i])
-        ....:                 for i in range(x.degree()-1))
+        ....:                 for i in xrange(x.degree()-1))
         ....:             and sum(x) == sum(y))
         sage: n = ZZ.random_element(10)
         sage: V = VectorSpace(QQ, n)