Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polyhedron constructors: minimal vs. non-minimal input representations; input both Vrep and Hrep #26366

Open
mkoeppe opened this issue Sep 30, 2018 · 10 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 30, 2018

Follow-up from #17339 - Polyhedron class mistreats empty inputs.

As suggested in #17339 comment:5, we complement the Polyhedron constructor with several new constructors with simpler semantics.

  • Polyhedron.from_Vrep
  • Polyhedron.from_Hrep
  • Polyhedron.empty

We also add a constructor Polyhedron.from_Vrep_and_Hrep that accepts both Vrep and Hrep (backend work for this appears on #22701, #26368).

But there are open questions regarding the possible design. All Polyhedron methods currently guarantee minimal representations. This is reflected also in the names of methods for accessing the V-represenation, such as vertex_generator; but not in those for the H-representation (inequality_generator). (Note the minimize argument is unused in the whole Polyhedron code.) Compare with polymake, which has a clear distinction between minimal and non-minimal presentations (VERTICES vs. POINTS). This ia addressed in #34327.

Follow-up / related:

  • make this used in as_polyhedron method in face.py
  • "lazy" backend for Polyhedron

CC: @jplab @seblabbe @kliem @yuan-zhou

Component: geometry

Author: Matthias Koeppe, ...

Branch/Commit: u/mkoeppe/polyhedron_constructors__minimal_vs__non_minimal_input_representations__input_both_vrep_and_hrep @ 05fef94

Issue created by migration from https://trac.sagemath.org/ticket/26366

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Polyhedron - lazy backend; minimal vs. non-minimal presentations Polyhedron - lazy backend; minimal vs. non-minimal presentations; Polyhedron constructor with both Vrep, Hrep Sep 30, 2018
@jplab

This comment has been minimized.

@jplab
Copy link

jplab commented Jun 12, 2019

comment:4

Here is just a note about constructing from both V- and H- representation:

The method as_polyhedron of PolyhedronFaces would benefit greatly from this, so perhaps as a follow-up or on this ticket.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe added this to the sage-9.4 milestone May 26, 2021
@mkoeppe mkoeppe changed the title Polyhedron - lazy backend; minimal vs. non-minimal presentations; Polyhedron constructor with both Vrep, Hrep Polyhedron constructors: minimal vs. non-minimal input representations; input both Vrep and Hrep May 26, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 26, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 27, 2021

Commit: 05fef94

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 27, 2021

Author: Matthias Koeppe, ...

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 27, 2021

comment:7

This is an early draft, with the purpose of supporting #31799. Comments and improvements to the design are very welcome.

One thing needed for #31799 is finding the parent early - then, for parents that implement init from both representations, one could efficiently compute the double description before calling the element constructor.


New commits:

05fef94src/sage/geometry/polyhedron/constructor.py: Add more constructors

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Mar 5, 2022
@kliem
Copy link
Contributor

kliem commented Apr 15, 2022

comment:11

What is the status here?

I think the minimal/non-minimal issue should really be fixed. In a way, it is only relevant for Polyhedron_mutual. If the backend doesn't allow modification, then what is the point in being lazy?

I really don't know what name choices what make sense and involve little deprecation.
Do we need anything but minimal representation? For the input sure, but once you are asking for Vrepresentation or Hrepresentation or inequalities, you usually want something minimal. But then again, if I construct P and Q only to compute their intersection, I don't care about the minimal inequalities in many cases.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 7, 2023
@mkoeppe mkoeppe removed this from the sage-10.0 milestone Apr 30, 2023
@mkoeppe mkoeppe added this to the sage-10.1 milestone Apr 30, 2023
@mkoeppe mkoeppe removed this from the sage-10.1 milestone Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants