Changes between Version 1 and Version 2 of Ticket #24877


Ignore:
Timestamp:
03/01/18 16:24:53 (4 years ago)
Author:
vdelecroix
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24877

    • Property Summary changed from bug in plotting polyhedron over RDF to bug in polyhedron over RDF
  • Ticket #24877 – Description

    v1 v2  
    1515  -429364759737031049317769174492863890735634068814210512342503744054527903830844433491149538512537/169296796161110084211548448622149955145002732358082778064645608216077666698460018565094060494217]]
    1616P = Polyhedron(verts, base_ring=RDF)
    17 P.plot()
     17P.faces(1)
    1818}}}
    1919with traceback
    2020{{{
    21 .../sage/geometry/polyhedron/base.pyc in
    22 plot(self, point, line, polygon, wireframe, fill, projection_direction, **kwds)
    23     789                 return polyhedron.projection()
    24     790
    25 --> 791         projection = project(self)
    26     792         try:
    27     793             plot_method = projection.plot
     21sage: P.faces(1)
     22---------------------------------------------------------------------------
     23KeyError                                  Traceback (most recent call last)
     24<ipython-input-4-5c776b0f6df7> in <module>()
     25----> 1 P.faces(Integer(1))
    2826
    29 .../sage/geometry/polyhedron/base.pyc
    30 in project(polyhedron)
    31     787                 return polyhedron.schlegel_projection()
    32     788             else:
    33 --> 789                 return polyhedron.projection()
    34     790
    35     791         projection = project(self)
     27/opt/sage/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.pyc in faces(self, face_dimension)
     28   3890             ()
     29   3891         """
     30-> 3892         fl = self.face_lattice().level_sets()
     31   3893         codim = self.dim() - face_dimension
     32   3894         index = len(fl) - 1 - codim
    3633
    37 .../sage/geometry/polyhedron/base.pyc
    38 in projection(self)
    39    4165         """
    40    4166         from .plot import Projection
    41 -> 4167         self.projection = Projection(self)
    42    4168         return self.projection
    43    4169
    44 
    45 .../sage/geometry/polyhedron/plot.pyc
    46 in __init__(self, polyhedron, proj)
    47     492
    48     493         if polyhedron.ambient_dim() == 2:
    49 --> 494             self._init_from_2d(polyhedron)
    50     495         elif polyhedron.ambient_dim() == 3:
    51     496             self._init_from_3d(polyhedron)
    52 
    53 .../sage/geometry/polyhedron/plot.pyc
    54 in _init_from_2d(self, polyhedron)
    55     748         self.dimension = 2
    56     749         self._init_points(polyhedron)
    57 --> 750         self._init_lines_arrows(polyhedron)
    58     751         self._init_area_2d(polyhedron)
    59     752
    60 
    61 .../sage/geometry/polyhedron/plot.pyc in
    62 _init_lines_arrows(self, polyhedron)
    63     812             if not obj[i].is_vertex(): continue
    64     813             for j in range(len(obj)):
    65 --> 814                 if polyhedron.vertex_adjacency_matrix()[i,j] == 0: continue
    66     815                 if i < j and obj[j].is_vertex():
    67     816                     l = [obj[i].vector(), obj[j].vector()]
    68 
    69 .../site-packages/sage/misc/cachefunc.pyx
    70 in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:13441)()
     34/opt/sage/local/lib/python2.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:13441)()
    7135   2375         if self.cache is None:
    7236   2376             f = self.f
     
    7539   2379
    7640
    77 .../sage/geometry/polyhedron/base.pyc
    78 in vertex_adjacency_matrix(self)
    79    2036             (0, 0, 1, 1, 0) A vertex at (3, 0)
    80    2037         """
    81 -> 2038         return self._vertex_adjacency_matrix()
    82    2039
    83    2040     adjacency_matrix = vertex_adjacency_matrix
    84 
    85 .../sage/geometry/polyhedron/base.pyc
    86 in _vertex_adjacency_matrix(self)
    87     334             M[j, i] = 1
    88     335
    89 --> 336         face_lattice = self.face_lattice()
    90     337         for face in face_lattice:
    91     338             Vrep = face.ambient_Vrepresentation()
    92 
    93 .../sage/misc/cachefunc.pyx
    94 in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:13441)()
    95    2375         if self.cache is None:
    96    2376             f = self.f
    97 -> 2377             self.cache = f(self._instance)
    98    2378         return self.cache
    99    2379
    100 
    101 .../sage/geometry/polyhedron/base.pyc
    102 in face_lattice(self)
     41/opt/sage/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.pyc in face_lattice(self)
    10342   3814         return Hasse_diagram_from_incidences\
    10443   3815             (atoms_incidences, coatoms_incidences,
     
    10746   3818     def faces(self, face_dimension):
    10847
    109 .../sage/geometry/hasse_diagram.pyc
    110 in Hasse_diagram_from_incidences(atom_to_coatoms, coatom_to_atoms, face_constructor, required_atoms, key, **kwds)
     48/opt/sage/local/lib/python2.7/site-packages/sage/geometry/hasse_diagram.pyc in Hasse_diagram_from_incidences(atom_to_coatoms, coatom_to_atoms, face_constructor, required_atoms, key, **kwds)
    11149    180     # Make sure that coatoms are in the end in proper order
    11250    181     tail = [faces[atoms, frozenset([coatom])]
     
    11755KeyError: (frozenset([7]), frozenset([3]))
    11856}}}
     57Actually the obtained polygon has 9 vertices and 10 edges
     58{{{
     59sage: P.n_vertices()
     609
     61sage: P.n_facets()
     6210
     63}}}