Changes between Version 1 and Version 7 of Ticket #22701


Ignore:
Timestamp:
Sep 30, 2018, 5:53:51 AM (4 years ago)
Author:
mkoeppe
Comment:

New commits:

cc73721Polyhedron_field._init_{H,V}representation_backend: Refactor through new methods _init_{H,V}representation
7a0438ePolyhedra_base._element_constructor: Refactor through new method _element_constructor_polyhedron
d6e0d68Polyhedra_field._element_constructor: Implement a version using both representations
6d91f25Polyhedron_field.__init__: New, handle Vrep+Hrep case

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22701

    • Property Status changed from new to needs_review
    • Property Authors changed from to Matthias Koeppe
    • Property Cc moritz novoselt tscrim added
    • Property Summary changed from Setting up a Polyhedron from both Vrep and Hrep to Setting up a Polyhedron from both Vrep and Hrep - for backend='field'
    • Property Branch changed from to u/mkoeppe/setting_up_a_polyhedron_from_both_vrep_and_hrep
    • Property Milestone changed from sage-8.0 to sage-8.4
    • Property Commit changed from to 6d91f255cacaf7fb89b3a8ad1ebcc470e7ef7437
  • Ticket #22701 – Description

    v1 v7  
    11Currently, only one of the two is allowed.
    2 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.
     2For 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.)
    33Users should also be allowed to indicate whether the given presentations are already minimal.
    44
    5 In particular this could help to implement a fast version of `change_backend()` (#22575) and could be the basis of code that delegates to a particular backend for particular features.
     5In this ticket, we implement this for `Polyhedron_field`, enabling fast `base_extend`.
     6
     7When both V-rep and H-rep are given, they must be minimal; the interface is designed to allow for future extensions.
     8
     9The top-level constructor `Polyhedron` is unchanged in this ticket. It is still an error if `Polyhedron(vertices=..., inequalities=...)` is attempted.
     10
     11Without this ticket:
     12{{{
     13sage: p = polytopes.hypercube(6, backend='ppl')
     14sage: %time q = p.base_extend(AA)
     15CPU times: user 2.27 s, sys: 10.3 ms, total: 2.28 s
     16Wall time: 2.28 s
     17sage: q
     18A 6-dimensional polyhedron in AA^6 defined as the convex hull of 64 vertices
     19}}}
     20
     21With this ticket:
     22{{{
     23CPU times: user 13.4 ms, sys: 603 µs, total: 14 ms
     24Wall time: 14.9 ms
     25}}}
     26
    627
    728Related: