Opened 7 years ago

Closed 3 years ago

#19803 closed defect (fixed)

difference of behavior in polyhedra with different backends

Reported by: Vincent Delecroix Owned by:
Priority: major Milestone: sage-9.1
Component: geometry Keywords: empty polyhedron, cdd
Cc: Volker Braun, Jean-Philippe Labbé, Moritz Firsching Merged in:
Authors: Jonathan Kliem Reviewers: Laith Rastanawi
Report Upstream: N/A Work issues:
Branch: 96dad18 (Commits, GitHub, GitLab) Commit: 96dad18223aad6e4c446978738aaa2444acc5f2f
Dependencies: Stopgaps:

Status badges

Description (last modified by gh-kliem)

The following error used to occur:

sage: from sage.geometry.polyhedron.parent import Polyhedra
sage: P_ppl = Polyhedra(ZZ, 3, 'ppl')
sage: P_cdd = Polyhedra(ZZ, 3, 'cdd')
sage: P_ppl([[],[],[]], None)
The empty polyhedron in ZZ^3
sage: P_cdd([[],[],[]], None)
Traceback (most recent call last):
...
TypeError: can't multiply sequence by non-int of type 'NoneType'

Apparently it got fixed along the way and we add doctests verifying it.

Change History (6)

comment:1 Changed 6 years ago by Jean-Philippe Labbé

This might be related to #17339.

comment:2 Changed 5 years ago by Jean-Philippe Labbé

This is because the cdd backend does not have an _init_empty_polyhedron method. That should be an easy fix.

The problem in the description is that it tries to get the common length of elements in the v-representation while they are all None. This should be grabbed beforehand and initialize an empty polyhedron like we do in the other cases.

comment:3 Changed 5 years ago by Jean-Philippe Labbé

Cc: Jean-Philippe Labbé Moritz Firsching added

comment:4 Changed 3 years ago by gh-kliem

Authors: Jonathan Kliem
Branch: public/19803
Commit: 96dad18223aad6e4c446978738aaa2444acc5f2f
Description: modified (diff)
Keywords: empty polyhedron cdd added
Milestone: sage-7.0sage-9.1
Status: newneeds_review

Looks like this got fixed along the way.


New commits:

96dad18add doctests that cdd can handle empty polyhedron now

comment:5 Changed 3 years ago by Laith Rastanawi

Reviewers: Laith Rastanawi
Status: needs_reviewpositive_review

comment:6 Changed 3 years ago by Volker Braun

Branch: public/1980396dad18223aad6e4c446978738aaa2444acc5f2f
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.