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

Commit

Permalink
sage.geometry: More # optional - sage.rings.number_field
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Aug 26, 2022
1 parent 2a0c39a commit 278b93f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/sage/geometry/polyhedron/base3.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ def slack_matrix(self):
[1 0 1 0 0 1]
[1 0 0 0 1 1]
sage: P = polytopes.dodecahedron().faces(2)[0].as_polyhedron()
sage: P.slack_matrix()
sage: P = polytopes.dodecahedron().faces(2)[0].as_polyhedron() # optional - sage.rings.number_field
sage: P.slack_matrix() # optional - sage.rings.number_field
[1/2*sqrt5 - 1/2 0 0 1 1/2*sqrt5 - 1/2 0]
[ 0 0 1/2*sqrt5 - 1/2 1/2*sqrt5 - 1/2 1 0]
[ 0 1/2*sqrt5 - 1/2 1 0 1/2*sqrt5 - 1/2 0]
Expand Down
12 changes: 6 additions & 6 deletions src/sage/geometry/polyhedron/base6.py
Original file line number Diff line number Diff line change
Expand Up @@ -1176,9 +1176,9 @@ def affine_hull_projection(self,
A vertex at (2, 0, 0),
A vertex at (1, 3/2, 0),
A vertex at (1, 1/2, 4/3))
sage: A = S.affine_hull_projection(orthonormal=True, extend=True); A
sage: A = S.affine_hull_projection(orthonormal=True, extend=True); A # optional - sage.rings.number_field
A 3-dimensional polyhedron in AA^3 defined as the convex hull of 4 vertices
sage: A.vertices()
sage: A.vertices() # optional - sage.rings.number_field
(A vertex at (0.7071067811865475?, 0.4082482904638630?, 1.154700538379252?),
A vertex at (0.7071067811865475?, 1.224744871391589?, 0.?e-18),
A vertex at (1.414213562373095?, 0.?e-18, 0.?e-18),
Expand All @@ -1187,11 +1187,11 @@ def affine_hull_projection(self,
With the parameter ``minimal`` one can get a minimal base ring::
sage: s = polytopes.simplex(3)
sage: s_AA = s.affine_hull_projection(orthonormal=True, extend=True)
sage: s_AA.base_ring()
sage: s_AA = s.affine_hull_projection(orthonormal=True, extend=True) # optional - sage.rings.number_field
sage: s_AA.base_ring() # optional - sage.rings.number_field
Algebraic Real Field
sage: s_full = s.affine_hull_projection(orthonormal=True, extend=True, minimal=True)
sage: s_full.base_ring()
sage: s_full = s.affine_hull_projection(orthonormal=True, extend=True, minimal=True) # optional - sage.rings.number_field
sage: s_full.base_ring() # optional - sage.rings.number_field
Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a = 0.5176380902050415?
More examples with the ``orthonormal`` parameter::
Expand Down

0 comments on commit 278b93f

Please sign in to comment.