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:  sage9.1 
Component:  geometry  Keywords:  empty polyhedron, cdd 
Cc:  Volker Braun, JeanPhilippe 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: 
Description (last modified by )
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 nonint 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
comment:2 Changed 5 years ago by
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 vrepresentation 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
Cc:  JeanPhilippe Labbé Moritz Firsching added 

comment:4 Changed 3 years ago by
Authors:  → Jonathan Kliem 

Branch:  → public/19803 
Commit:  → 96dad18223aad6e4c446978738aaa2444acc5f2f 
Description:  modified (diff) 
Keywords:  empty polyhedron cdd added 
Milestone:  sage7.0 → sage9.1 
Status:  new → needs_review 
Looks like this got fixed along the way.
New commits:
96dad18  add doctests that cdd can handle empty polyhedron now

comment:5 Changed 3 years ago by
Reviewers:  → Laith Rastanawi 

Status:  needs_review → positive_review 
comment:6 Changed 3 years ago by
Branch:  public/19803 → 96dad18223aad6e4c446978738aaa2444acc5f2f 

Resolution:  → fixed 
Status:  positive_review → closed 
Note: See
TracTickets for help on using
tickets.
This might be related to #17339.