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

Commit

Permalink
Polyhedron_base.affine_hull_projection: section map for non-orthogona…
Browse files Browse the repository at this point in the history
…l case
  • Loading branch information
Matthias Koeppe committed Apr 15, 2021
1 parent dba2763 commit d49c313
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/geometry/polyhedron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10356,7 +10356,8 @@ def affine_hull_projection(self, as_polyhedron=None, as_affine_map=False, orthog
gens.append(l.vector())

# Pick subset of coordinates to coordinatize the affine span
pivots = matrix(gens).pivots()
M = matrix(gens)
pivots = M.pivots()

A = matrix([[1 if j == i else 0 for j in range(self.ambient_dim())] for i in pivots])
if as_affine_map:
Expand All @@ -10366,7 +10367,9 @@ def affine_hull_projection(self, as_polyhedron=None, as_affine_map=False, orthog
if as_polyhedron:
result['polyhedron'] = A*self
if return_all_data:
raise NotImplementedError
E = M.echelon_form()
L_section = linear_transformation(matrix([E[i] for i in pivots]).transpose(), side='right')
result['section_map'] = (L_section, v0 - L_section(L(v0) + image_translation))

# assemble result
if return_all_data or (as_polyhedron and as_affine_map):
Expand Down

0 comments on commit d49c313

Please sign in to comment.