Ticket #13747: trac_13747-rebase-11763.patch

File trac_13747-rebase-11763.patch, 3.2 KB (added by ncohen, 8 years ago)
  • sage/geometry/polyhedron/base.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1355838507 -3600
    # Node ID fcc197c0e9578a0cf4481f560ed1cf0164f8b63e
    # Parent  783c4519826ff4a179e20d7383db30942f78c54b
    Change default behaviour of Poset to facade = True - Rebased on 11763
    
    diff --git a/sage/geometry/polyhedron/base.py b/sage/geometry/polyhedron/base.py
    a b  
    24862486        index = len(fl) - 1 - codim
    24872487        if index>=len(fl) or index<1:
    24882488            return tuple()
    2489         return tuple(face.element for face in fl[index])
     2489        return tuple(fl[index])
    24902490
    24912491    @cached_method
    24922492    def f_vector(self):
  • sage/geometry/polyhedron/face.py

    diff --git a/sage/geometry/polyhedron/face.py b/sage/geometry/polyhedron/face.py
    a b  
    250250
    251251            sage: square = polytopes.n_cube(2)
    252252            sage: f = square.face_lattice()[5:9]
    253             sage: matrix(4,4, lambda i,j: cmp(f[i].element, f[j].element))
     253            sage: matrix(4,4, lambda i,j: cmp(f[i], f[j]))
    254254            [ 0 -1 -1 -1]
    255255            [ 1  0 -1 -1]
    256256            [ 1  1  0  1]
     
    286286
    287287            sage: square = polytopes.n_cube(2)
    288288            sage: for fl in square.face_lattice():
    289             ...       print fl.element.ambient_Hrepresentation()
     289            ...       print fl.ambient_Hrepresentation()
    290290            ...
    291291            (An inequality (1, 0) x + 1 >= 0, An inequality (0, 1) x + 1 >= 0,
    292292             An inequality (-1, 0) x + 1 >= 0, An inequality (0, -1) x + 1 >= 0)
     
    328328
    329329            sage: square = polytopes.n_cube(2)
    330330            sage: for fl in square.face_lattice():
    331             ...       print fl.element.ambient_Vrepresentation()
     331            ...       print fl.ambient_Vrepresentation()
    332332            ...
    333333            ()
    334334            (A vertex at (-1, -1),)
     
    361361        EXAMPLES::
    362362
    363363            sage: p = polytopes.cross_polytope(4)
    364             sage: face = p.face_lattice()[10].element
     364            sage: face = p.face_lattice()[10]
    365365            sage: face
    366366            <0,2>
    367367            sage: face.ambient_Hrepresentation()
     
    388388        EXAMPLES::
    389389
    390390            sage: p = polytopes.cross_polytope(4)
    391             sage: face = p.face_lattice()[10].element
     391            sage: face = p.face_lattice()[10]
    392392            sage: face
    393393            <0,2>
    394394            sage: face.ambient_Vrepresentation()
     
    423423        EXAMPLES::
    424424
    425425            sage: fl = polytopes.dodecahedron().face_lattice()
    426             sage: [ x.element.dim() for x in fl ]
     426            sage: [ x.dim() for x in fl ]
    427427            [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    428428              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    429429              1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3]
     
    446446        EXAMPLES::
    447447
    448448            sage: square = polytopes.n_cube(2)
    449             sage: a_face = list( square.face_lattice() )[8].element
     449            sage: a_face = list( square.face_lattice() )[8]
    450450            sage: a_face.__repr__()
    451451            '<1,3>'
    452452        """