From 3de09687eda60668146db73602d368be4ef4f853 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 2 Nov 2018 23:59:02 -0400 Subject: [PATCH] cone/schur.py: test that the schur cone induces the majorization ordering. --- mjo/cone/schur.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/mjo/cone/schur.py b/mjo/cone/schur.py index fd806d9..3903b2b 100644 --- a/mjo/cone/schur.py +++ b/mjo/cone/schur.py @@ -19,6 +19,11 @@ def schur_cone(n): REFERENCES: + .. [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, + doi:10.1007/s10107-005-0626-z. + .. [SeegerSossaI] Alberto Seeger and David Sossa. Critical angles between two convex cones I. General theory. TOP, 24(1):44-65, 2016, doi:10.1007/s11750-015-0375-y. @@ -49,6 +54,23 @@ def schur_cone(n): sage: schur_cone(0).is_trivial() True + The Schur cone induces the majorization ordering:: + + 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)) + ....: and sum(x) == sum(y)) + sage: n = ZZ.random_element(10) + sage: V = VectorSpace(QQ, n) + sage: S = schur_cone(n) + sage: majorized_by(V.zero(), S.random_element()) + True + sage: x = V.random_element() + sage: y = V.random_element() + sage: majorized_by(x,y) == ( (y-x) in S ) + True + """ def _f(i,j): -- 2.44.2