-
-
Notifications
You must be signed in to change notification settings - Fork 654
Description
Currently, only one of the two is allowed.
For at least some backends (certainly, the generic ("field"
) backend and polymake (#22683)), it makes sense to initialize with both if they are known, to avoid expensive recomputation. (This could also be the basis of code that delegates to a particular backend for particular features.)
Users should also be allowed to indicate whether the given presentations are already minimal.
In this ticket, we implement this for Polyhedron_field
, enabling fast base_extend
.
When both V-rep and H-rep are given, they must be minimal; the interface is designed to allow for future extensions.
The top-level constructor Polyhedron
is unchanged in this ticket. It is still an error if Polyhedron(vertices=..., inequalities=...)
is attempted.
Without this ticket:
sage: p = polytopes.hypercube(6, backend='ppl')
sage: %time q = p.base_extend(AA)
CPU times: user 2.27 s, sys: 10.3 ms, total: 2.28 s
Wall time: 2.28 s
sage: q
A 6-dimensional polyhedron in AA^6 defined as the convex hull of 64 vertices
With this ticket:
CPU times: user 13.4 ms, sys: 603 µs, total: 14 ms
Wall time: 14.9 ms
Related:
- Polyhedron class mistreats empty inputs #17339:
Polyhedron
class mistreats empty inputs
Follow-up:
- Setting up a Polyhedron from both Vrep and Hrep - for backend='polymake' #26368: Setting up a
Polyhedron
from both Vrep and Hrep - forbackend='polymake'
- Polyhedron constructors: minimal vs. non-minimal input representations; input both Vrep and Hrep #26366:
Polyhedron
- lazy backend; minimal vs. non-minimal presentations;Polyhedron
constructor with both Vrep, Hrep
CC: @jplab @mforets @mo271 @novoselt @tscrim
Component: geometry
Keywords: polytope, days84
Author: Matthias Koeppe
Branch/Commit: e34d845
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/22701