Skip to content

Bug in incidence_matrix of CombinatorialPolyhedron #29455

@LaisRast

Description

@LaisRast

The incidence_matrix method of a 0-dimensional CombinatorialPolyhedron returns an error:

sage: P = Polyhedron([[0]]); P
A 0-dimensional polyhedron in ZZ^1 defined as the convex hull of 1 vertex
sage: C = P.combinatorial_polyhedron()
sage: C.incidence_matrix()
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-7-dab311ba238f> in <module>()
----> 1 C.incidence_matrix()
...
ValueError: ``output_dimension`` must be the dimension of proper faces

We fix this and make the 0-dimensional case consistent with Polyhedron_base.

Also we make incidence_matrix a chached_method.

CC: @jplab @kliem

Component: geometry

Keywords: polytope, combinatorialpolyhedron, incidence_matrix

Author: Jonathan Kliem

Branch/Commit: 34f3254

Reviewer: Laith Rastanawi

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions