Ask Your Question
1

PolyhedronFace

asked 2020-04-08 12:26:06 +0100

anonymous user

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2020-04-08 17:08:58 +0100

jipilab gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-04-08 12:26:06 +0100

Seen: 310 times

Last updated: Apr 08 '20