PolyhedronFace

Anonymous

Hello,

In the PolyhedronFace class, everything works fine for me except the functions ambient_V_indices and ambient_H_indices. Exemple :

square = polytopes.hypercube(2)
fl = square.face_lattice();

list(f.ambient_V_indices() for f in fl)


I get :

AttributeError                            Traceback (most recent call last)
<ipython-input-3-58aa615735f2> in <module>()
2 fl = square.face_lattice();fl
3
----> 4 list(f.ambient_V_indices() for f in fl)

<ipython-input-3-58aa615735f2> in <genexpr>((f,))
2 fl = square.face_lattice();fl
3
----> 4 list(f.ambient_V_indices() for f in fl)

AttributeError: 'PolyhedronFace' object has no attribute 'ambient_V_indices'


Other methods work fine:

simplex = polytopes.simplex(3)
for face in simplex.faces(2):
print face.as_polyhedron()
print face.dim()
print face.vertices()


work perfectly.

When I deal with a polyhedron face, I would really like to get corresponding vertices indices in the parent polyhedron via "ambient" methodes. How can I fix this ?

Thanks a lot

edit retag close merge delete

Sort by ยป oldest newest most voted

In sage 9.0, I can execute:

sage: square = polytopes.hypercube(2)
sage: fl = square.face_lattice();
sage: list(f.ambient_V_indices() for f in fl)
[(), (0,), (1,), (2,), (3,), (0, 1), (0, 2), (2, 3), (1, 3), (0, 1, 2, 3)]


Which version of sage are you using? That might be a problem as the function ambient_V_indices is available since version 8.8.

more