Skip to content

Commit e8453e1

Browse files
author
Release Manager
committed
gh-36033: `sage.geometry`: Update `# needs`, use block-scoped tags <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> Cherry-picked from - #35095 Part of - #29705 <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36033 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Matthias Köppe
2 parents 1039d66 + 897660f commit e8453e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2823
-2576
lines changed

src/sage/geometry/abc.pyx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ class LatticePolytope:
1313
EXAMPLES::
1414
1515
sage: import sage.geometry.abc
16-
sage: P = LatticePolytope([(1,2,3), (4,5,6)]) # optional - sage.geometry.polyhedron
17-
sage: isinstance(P, sage.geometry.abc.LatticePolytope) # optional - sage.geometry.polyhedron
16+
sage: P = LatticePolytope([(1,2,3), (4,5,6)]) # needs sage.geometry.polyhedron
17+
sage: isinstance(P, sage.geometry.abc.LatticePolytope) # needs sage.geometry.polyhedron
1818
True
1919
2020
By design, there is a unique direct subclass::
2121
22-
sage: sage.geometry.abc.LatticePolytope.__subclasses__() # optional - sage.geometry.polyhedron
22+
sage: sage.geometry.abc.LatticePolytope.__subclasses__() # needs sage.geometry.polyhedron
2323
[<class 'sage.geometry.lattice_polytope.LatticePolytopeClass'>]
2424
2525
sage: len(sage.geometry.abc.Polyhedron.__subclasses__()) <= 1
@@ -39,13 +39,13 @@ class ConvexRationalPolyhedralCone:
3939
EXAMPLES::
4040
4141
sage: import sage.geometry.abc
42-
sage: C = cones.nonnegative_orthant(2) # optional - sage.geometry.polyhedron
43-
sage: isinstance(C, sage.geometry.abc.ConvexRationalPolyhedralCone) # optional - sage.geometry.polyhedron
42+
sage: C = cones.nonnegative_orthant(2) # needs sage.geometry.polyhedron
43+
sage: isinstance(C, sage.geometry.abc.ConvexRationalPolyhedralCone) # needs sage.geometry.polyhedron
4444
True
4545
4646
By design, there is a unique direct subclass::
4747
48-
sage: sage.geometry.abc.ConvexRationalPolyhedralCone.__subclasses__() # optional - sage.geometry.polyhedron
48+
sage: sage.geometry.abc.ConvexRationalPolyhedralCone.__subclasses__() # needs sage.geometry.polyhedron
4949
[<class 'sage.geometry.cone.ConvexRationalPolyhedralCone'>]
5050
5151
sage: len(sage.geometry.abc.Polyhedron.__subclasses__()) <= 1
@@ -65,13 +65,13 @@ class Polyhedron:
6565
EXAMPLES::
6666
6767
sage: import sage.geometry.abc
68-
sage: P = polytopes.cube() # optional - sage.geometry.polyhedron
69-
sage: isinstance(P, sage.geometry.abc.Polyhedron) # optional - sage.geometry.polyhedron
68+
sage: P = polytopes.cube() # needs sage.geometry.polyhedron
69+
sage: isinstance(P, sage.geometry.abc.Polyhedron) # needs sage.geometry.polyhedron
7070
True
7171
7272
By design, there is a unique direct subclass::
7373
74-
sage: sage.geometry.abc.Polyhedron.__subclasses__() # optional - sage.geometry.polyhedron
74+
sage: sage.geometry.abc.Polyhedron.__subclasses__() # needs sage.geometry.polyhedron
7575
[<class 'sage.geometry.polyhedron.base0.Polyhedron_base0'>]
7676
7777
sage: len(sage.geometry.abc.Polyhedron.__subclasses__()) <= 1

src/sage/geometry/cone.py

Lines changed: 156 additions & 140 deletions
Large diffs are not rendered by default.

src/sage/geometry/cone_catalog.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ def rearrangement(p, ambient_dim=None, lattice=None):
374374
sage: ambient_dim = ZZ.random_element(2,10).abs()
375375
sage: p = ZZ.random_element(1, ambient_dim)
376376
sage: K = cones.rearrangement(p, ambient_dim)
377-
sage: P = SymmetricGroup(ambient_dim).random_element().matrix() # optional - sage.groups
378-
sage: all(K.contains(P*r) for r in K) # optional - sage.groups
377+
sage: P = SymmetricGroup(ambient_dim).random_element().matrix() # needs sage.groups
378+
sage: all(K.contains(P*r) for r in K) # needs sage.groups
379379
True
380380
381381
The smallest ``p`` components of every element of the rearrangement
@@ -527,13 +527,14 @@ def schur(ambient_dim=None, lattice=None):
527527
generators of the Schur cone and the nonnegative orthant in
528528
dimension five is `\left(3/4\right)\pi`::
529529
530+
sage: # needs sage.rings.number_fields
530531
sage: P = cones.schur(5)
531532
sage: Q = cones.nonnegative_orthant(5)
532-
sage: G = ( g.change_ring(QQbar).normalized() for g in P ) # optional - sage.rings.number_fields
533-
sage: H = ( h.change_ring(QQbar).normalized() for h in Q ) # optional - sage.rings.number_fields
534-
sage: actual = max(arccos(u.inner_product(v)) for u in G for v in H) # optional - sage.rings.number_fields
535-
sage: expected = 3*pi/4 # optional - sage.rings.number_fields
536-
sage: abs(actual - expected).n() < 1e-12 # optional - sage.rings.number_fields
533+
sage: G = ( g.change_ring(QQbar).normalized() for g in P )
534+
sage: H = ( h.change_ring(QQbar).normalized() for h in Q )
535+
sage: actual = max(arccos(u.inner_product(v)) for u in G for v in H)
536+
sage: expected = 3*pi/4
537+
sage: abs(actual - expected).n() < 1e-12
537538
True
538539
539540
The dual of the Schur cone is the "downward monotonic cone"
@@ -566,7 +567,7 @@ def schur(ambient_dim=None, lattice=None):
566567
True
567568
sage: x = V.random_element()
568569
sage: y = V.random_element()
569-
sage: majorized_by(x,y) == ( (y-x) in S ) # optional - sage.rings.number_fields
570+
sage: majorized_by(x,y) == ( (y-x) in S )
570571
True
571572
572573
If a ``lattice`` was given, it is actually used::

0 commit comments

Comments
 (0)