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

Commit

Permalink
replace attributes by methods; remove attribute Vinv
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Oct 28, 2019
1 parent 906b12b commit b0eac08
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 81 deletions.
21 changes: 16 additions & 5 deletions src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd
Expand Up @@ -8,19 +8,19 @@ from .polyhedron_face_lattice cimport PolyhedronFaceLattice

@cython.final
cdef class CombinatorialPolyhedron(SageObject):
# Do not assume any of those attributes to be initialized, use the corresponding methods instead.
cdef tuple _V # the names of VRep, if they exist
cdef dict _Vinv # dictionary to look up enumeration of vertices
cdef tuple _H # the names of HRep, if they exist
cdef tuple _equalities # stores equalities, given on input (might belong to Hrep)
cdef int _dimension # stores dimension, -2 on init
cdef unsigned int _length_Hrepr # Hrepr might include equalities
cdef unsigned int _length_Vrepr # Vrepr might include rays/lines
cdef size_t _n_facets # length Hrep without equalities
cdef bint _unbounded # ``True`` iff Polyhedron is unbounded
cdef ListOfFaces bitrep_facets # facets in bit representation
cdef ListOfFaces bitrep_Vrepr # vertices in bit representation
cdef ListOfFaces far_face # a 'face' containing all none-vertices of Vrepr
cdef tuple far_face_tuple
cdef ListOfFaces _bitrep_facets # facets in bit representation
cdef ListOfFaces _bitrep_Vrepr # vertices in bit representation
cdef ListOfFaces _far_face # a 'face' containing all none-vertices of Vrepr
cdef tuple _far_face_tuple
cdef tuple _f_vector

# Edges, ridges and incidences are stored in a pointer of pointers.
Expand All @@ -40,6 +40,17 @@ cdef class CombinatorialPolyhedron(SageObject):
cdef size_t _n_face_lattice_incidences
cdef PolyhedronFaceLattice _all_faces # class to generate Hasse diagram incidences

cdef tuple V(self)
cdef tuple H(self)
cdef tuple equalities(self)
cdef unsigned int length_Vrepr(self)
cdef unsigned int length_Hrepr(self)
cdef bint unbounded(self)
cdef ListOfFaces bitrep_facets(self)
cdef ListOfFaces bitrep_Vrepr(self)
cdef ListOfFaces far_face(self)
cdef tuple far_face_tuple(self)

# Space for edges, ridges, etc. is allocated with ``MemoryAllocators``.
# Upon success they are copied to ``_mem_tuple``.
# Thus deallocation (at the correct time) is taken care of.
Expand Down

0 comments on commit b0eac08

Please sign in to comment.