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

Commit

Permalink
do not echolonize kernel matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Feb 5, 2020
1 parent 1e34f2a commit cc8f79a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/sage/geometry/polyhedron/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,19 @@ def gale_transform_to_polyhedron(vectors, base_ring=None, backend=None):
One can specify the base ring::
sage: gale_transform_to_polyhedron([(1,1),(-1,-1),(1,0),(-1,0),(1,-1),(-2,1)]).vertices()
(A vertex at (-54/7, 11/7, -40/7),
A vertex at (-39/7, 6/7, -32/7),
A vertex at (0, 0, 1),
A vertex at (0, 1, 0),
A vertex at (1, 0, 0),
A vertex at (86/7, -24/7, 65/7))
sage: gale_transform_to_polyhedron([(1,1),(-1,-1),(1,0),(-1,0),(1,-1),(-2,1)], base_ring=ZZ).vertices()
(A vertex at (-42, -27, -40),
A vertex at (-33, -22, -32),
A vertex at (0, 1, 0),
A vertex at (1, 0, 0),
A vertex at (6, 5, 7),
A vertex at (68, 43, 65))
(A vertex at (-25, 0, 0),
A vertex at (-15, 50, -60),
A vertex at (0, -25, 0),
A vertex at (0, 0, -25),
A vertex at (16, -35, 54),
A vertex at (24, 10, 31))
sage: gale_transform_to_polyhedron([(1,1),(-1,-1),(1,0),(-1,0),(1,-1),(-2,1)], base_ring=RDF).vertices()
(A vertex at (-0.64, 1.4, -2.16),
A vertex at (-0.96, -0.4, -1.24),
A vertex at (0.6, -2.0, 2.4),
A vertex at (1.0, 0.0, 0.0),
A vertex at (0.0, 1.0, 0.0),
A vertex at (0.0, 0.0, 1.0))
One can also specify the backend::
Expand Down Expand Up @@ -305,7 +305,7 @@ def gale_transform_to_polyhedron(vectors, base_ring=None, backend=None):
m = Matrix(base_ring, vectors).transpose().stack(Matrix(base_ring, [[1]*len(vectors)]))
else:
m = Matrix(vectors).transpose().stack(Matrix([[1]*len(vectors)]))
return Polyhedron(vertices=m.right_kernel().basis_matrix().transpose(),
return Polyhedron(vertices=m.right_kernel_matrix(basis='computed').transpose(),
base_ring=base_ring, backend=backend)


Expand Down

0 comments on commit cc8f79a

Please sign in to comment.