Closed dkrenn closed 3 years ago
Branch: u/dkrenn/affine-hull-more
New commits:
1ca3e2c | Trac #27329: actually use **kwds as promised in docs |
4efdb48 | Trac #27329: insert 3 whitespaces (PEP8) |
74470e2 | Trac #27329: insert an additional doctest enhancing the readability of |
9bedce6 | Trac #27366: new output parameters for affine_hull |
2075a6b | Trac #27366: use new parameter-options in .volume |
Dependencies: #27329
Branch pushed to git repo; I updated commit sha1. New commits:
e9ed7ee | Trac #27366: fixup (lines forgotten to commit in ~2) |
Branch pushed to git repo; I updated commit sha1. New commits:
0cf6bc5 | Trac #27366: docstring fixup |
Branch pushed to git repo; I updated commit sha1. New commits:
f8cb228 | Trac #27366 factor out parametric_form |
8fa37df | Trac #27366 use new .parametric_form |
294fbe1 | Trac #27366 output affine_map |
6cf71c7 | Trac #27366 update .volume (to new parameter set) |
477923b | Trac #27366 compute coordinate images |
2bbfdc2 | Trac #27366: update docs |
Branch pushed to git repo; I updated commit sha1. New commits:
3c09477 | Trac #27366: fix no-variables-bug-wrong-parent bug |
Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)
Moving tickets from the Sage 8.8 milestone that have been actively worked on in the last six months to the next release milestone (optimistically).
red branch, needs to be rebased on top of the latest beta
Changed keywords from none to polytope
Ticket retargeted after milestone closed
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
Changed branch from u/dkrenn/affine-hull-more to u/mkoeppe/affine-hull-more
Merged with current develop.
New commits:
b407987 | Merge tag '9.3.rc2' into t/27366/affine-hull-more |
Untested so far...
Changed dependencies from #27329 to none
Branch pushed to git repo; I updated commit sha1. New commits:
58e6dcc | Merge tag '9.3.rc3' into t/27366/affine-hull-more |
Branch pushed to git repo; I updated commit sha1. New commits:
8414039 | Polyhedron_base.affine_hull_projection: Document a weaker guarantee of parametric_form |
I plan to rework this so the output is a bit more straightforward.
We have affine_map
, which is the projection that sends the affine hull (k-dimensional affine subspace of Rn) to Rk.
What's missing is simply its section map that sends back Rk to the affine hull.
I think both parametric_form
and coordinate_images
somehow represent this section map.
As the section map is affine linear, we should represent it in the same way as affine_map
: A linear transformation and a shift.
Branch pushed to git repo; I updated commit sha1. New commits:
dba2763 | Polyhedron_base.affine_hull_projection: Replace 'affine_map' by 'projection_map', 'parametric_form'/'coordinate_images' by 'section_map' |
Changed author from Daniel Krenn to Daniel Krenn, Matthias Koeppe
For the non-orthogonal case, the section_map
still needs to be computed.
But comments are already welcome
Branch pushed to git repo; I updated commit sha1. New commits:
d49c313 | Polyhedron_base.affine_hull_projection: section map for non-orthogonal case |
Branch pushed to git repo; I updated commit sha1. New commits:
d77181b | Add doctest |
Description changed:
---
+++
@@ -1,3 +1,3 @@
At the moment when calling `.affine_hull`, either the polyhedron or the affine map can be returned. If both needed, parts need to be recomputed, so we extend the parameters to allow returning both at the same time.
-Moreover, we also allow to additionally return some more (internal) data using during creating the affine map. This is a preparation for #27365.
+Moreover, we also allow to additionally return the section map, i.e., the right inverse of the projection map. This is a preparation for #27365 and #31659.
Still some issues with algebraic numbers:
sage: D = polytopes.dodecahedron()
sage: D.facets()[0].as_polyhedron().affine_hull_projection()
A 2-dimensional polyhedron in (Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790?)^2 defined as the convex hull of 5 vertices
sage: D.facets()[0].as_polyhedron().affine_hull_projection(return_all_data=True)
TypeError: (-sqrt5 + 1, -2*sqrt5 + 4, 0) fails to convert into the map's domain Vector space of dimension 3 over Rational Field, but a `pushforward` method is not properly implemented
I have a fix almost ready and added a test method.
However, there is going to be one more ticket in the dependency chain:
sage: D = polytopes.dodecahedron()
sage: D.change_ring(AA) == D
False
The behavior is actually consistent with rings, I still don't like it.
Looks, like this is related to #4621:
sage: D = polytopes.dodecahedron()
sage: D.base_ring()
Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790?
sage: sqrt5 = D.base_ring().gens()[0]
sage: sqrt5 == AA(sqrt5)
False
sage: 0*sqrt5 == AA(0)
False
This is extremely stupid. At least it should throw an error instead of giving a false negative. But its pointless to be fixed here.
Edit: I realized that equality checks should never throw an error. So it is really hard to do the right thing here. The base ring of algebraic polyhedra has a specified embedding into RLF
, which makes it incomparable with AA
.
Changed author from Daniel Krenn, Matthias Koeppe to Daniel Krenn, Matthias Koeppe, Jonathan Kliem
Unfortunately, it is still at "needs work".
The test suite fails for polytopes.Birkhoff(3)
terribly (the section map has incorrect rank).
It also fails for the 0-dimensional polyhedron, but maybe that is just the way it is.
It fails for unbounded polyhedron, in particular Polyhedron(rays=[[0, 1]])
.
Changed branch from u/mkoeppe/affine-hull-more to u/gh-kliem/affine-hull-more
At the moment when calling
.affine_hull
, either the polyhedron or the affine map can be returned. If both needed, parts need to be recomputed, so we extend the parameters to allow returning both at the same time.Moreover, we also allow to additionally return the section map, i.e., the right inverse of the projection map. This is a preparation for #27365 and #31659.
Depends on #30551
CC: @jplab @videlec @kliem
Component: geometry
Keywords: polytope
Author: Daniel Krenn, Matthias Koeppe, Jonathan Kliem
Branch/Commit:
eee1aad
Reviewer: Matthias Koeppe, Jonathan Kliem
Issue created by migration from https://trac.sagemath.org/ticket/27366