Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
f_vector of CombinatorialPolyhedron is a vector
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Oct 15, 2019
1 parent 0f20b37 commit 326602c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx
Expand Up @@ -184,7 +184,7 @@ cdef class CombinatorialPolyhedron(SageObject):
an integer::
sage: CombinatorialPolyhedron(-1).f_vector()
(1,)
(1)
sage: CombinatorialPolyhedron(0).f_vector()
(1, 1)
sage: CombinatorialPolyhedron(5).f_vector()
Expand Down Expand Up @@ -759,7 +759,7 @@ cdef class CombinatorialPolyhedron(SageObject):
sage: C = CombinatorialPolyhedron(-1)
sage: C.f_vector()
(1,)
(1)
sage: C.n_facets()
0
Expand Down Expand Up @@ -1117,12 +1117,19 @@ cdef class CombinatorialPolyhedron(SageObject):
sage: C = CombinatorialPolyhedron(P)
sage: C.f_vector()
(1, 10, 45, 120, 185, 150, 50, 1)
TESTS::
sage: type(C.f_vector())
<type 'sage.modules.vector_integer_dense.Vector_integer_dense'>
"""
if not self._f_vector:
self._compute_f_vector()
if not self._f_vector:
raise ValueError("could not determine f_vector")
return self._f_vector
from sage.modules.free_module_element import vector
from sage.rings.all import ZZ
return vector(ZZ, self._f_vector)

def face_iter(self, dimension=None, dual=None):
r"""
Expand Down

0 comments on commit 326602c

Please sign in to comment.