Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Update a lot of toric doctests for the new facet order
Browse files Browse the repository at this point in the history
  • Loading branch information
novoselt committed Feb 6, 2017
1 parent 5281cf4 commit d244793
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 187 deletions.
68 changes: 34 additions & 34 deletions src/sage/geometry/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,50 +76,50 @@
The last output is not very illuminating. Let's try to improve it::
sage: for cone in fan1: print(cone.rays())
M(1, 0, 0),
M(0, 1, 0),
M(0, 0, -1)
in 3-d lattice M
M( 0, 1, 0),
M(-1, 0, 0),
M( 0, 0, -1)
M( 0, 1, 0),
M( 0, 0, 1),
M(-1, 0, 0)
in 3-d lattice M
M(1, 0, 0),
M(0, -1, 0),
M(0, 0, -1)
M( 0, 0, 1),
M(-1, 0, 0),
M( 0, -1, 0)
in 3-d lattice M
M(-1, 0, 0),
M( 0, -1, 0),
M( 0, 0, -1)
in 3-d lattice M
M( 0, 1, 0),
M(-1, 0, 0),
M( 0, 0, -1)
in 3-d lattice M
M(1, 0, 0),
M(0, 1, 0),
M(0, 0, -1)
in 3-d lattice M
M(1, 0, 0),
M(0, 1, 0),
M(0, 0, 1)
in 3-d lattice M
M( 0, 1, 0),
M( 0, 0, 1),
M(-1, 0, 0)
in 3-d lattice M
M(1, 0, 0),
M(0, 0, 1),
M(0, -1, 0)
in 3-d lattice M
M( 0, 0, 1),
M(-1, 0, 0),
M( 0, -1, 0)
M(1, 0, 0),
M(0, -1, 0),
M(0, 0, -1)
in 3-d lattice M
You can also do ::
sage: for cone in fan1: print(cone.ambient_ray_indices())
(0, 1, 5)
(1, 3, 5)
(0, 4, 5)
(1, 2, 3)
(2, 3, 4)
(3, 4, 5)
(1, 3, 5)
(0, 1, 5)
(0, 1, 2)
(1, 2, 3)
(0, 2, 4)
(2, 3, 4)
(0, 4, 5)
to see indices of rays of the fan corresponding to each cone.
Expand Down Expand Up @@ -618,17 +618,17 @@ def FaceFan(polytope, lattice=None):
M( 0, -1)
in 2-d lattice M
sage: for cone in P1xP1: print(cone.rays())
M(1, 0),
M(0, -1)
in 2-d lattice M
M(-1, 0),
M( 0, -1)
in 2-d lattice M
M( 0, 1),
M(-1, 0)
in 2-d lattice M
M(1, 0),
M(0, 1)
in 2-d lattice M
M( 0, 1),
M(-1, 0)
M(1, 0),
M(0, -1)
in 2-d lattice M
TESTS::
Expand Down Expand Up @@ -720,12 +720,12 @@ def NormalFan(polytope, lattice=None):
sage: P1xP1.rays()
N( 1, 0),
N( 0, 1),
N( 0, -1),
N(-1, 0)
N(-1, 0),
N( 0, -1)
in 2-d lattice N
sage: for cone in P1xP1: print(cone.rays())
N( 0, -1),
N(-1, 0)
N(-1, 0),
N( 0, -1)
in 2-d lattice N
N(1, 0),
N(0, -1)
Expand Down Expand Up @@ -2799,11 +2799,11 @@ def is_smooth(self, codim=None):
sage: fan.is_smooth(codim=1)
True
sage: fan.generating_cone(0).rays()
N(-1, 1),
N(-1, -1)
N(-1, -1),
N(-1, 1)
in 2-d lattice N
sage: fan.generating_cone(0).rays().matrix().det()
2
-2
"""
if codim is None or codim < 0:
codim = 0
Expand Down
20 changes: 10 additions & 10 deletions src/sage/geometry/fan_morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@
Domain fan: Rational polyhedral fan in 2-d lattice N
Codomain fan: Rational polyhedral fan in 2-d lattice N
sage: fm.domain_fan().rays()
N(-1, 1),
N( 1, 1),
N(-1, -1),
N( 1, -1),
N(-1, -1),
N(-1, 1),
N( 0, -1),
N( 0, 1)
in 2-d lattice N
sage: normal.rays()
N(-1, 1),
N( 1, 1),
N( 1, -1),
N(-1, -1),
N( 1, -1)
N(-1, 1)
in 2-d lattice N
As you see, it was necessary to insert two new rays (to prevent "upper" and
Expand Down Expand Up @@ -358,14 +358,14 @@ def _RISGIS(self):
sage: fm = FanMorphism(identity_matrix(2),
....: normal, face, subdivide=True)
sage: fm._RISGIS()
(frozenset({3}),
frozenset({2}),
frozenset({1}),
(frozenset({2}),
frozenset({3}),
frozenset({0}),
frozenset({1, 3}),
frozenset({1}),
frozenset({0, 1}),
frozenset({0, 2}),
frozenset({2, 3}))
frozenset({0, 3}),
frozenset({2, 3}),
frozenset({1, 2}))
"""
if "_RISGIS_" not in self.__dict__:
try:
Expand Down
Loading

0 comments on commit d244793

Please sign in to comment.