| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
_PolytopeFace
_PolytopeFace(polytope, vertices, facets)
Construct a polytope face.
POLYTOPE FACES SHOULD NOT BE CONSTRUCTED OUTSIDE OF LATTICE POLYTOPES!
INPUT:
polytope -- a polytope whose face is being constructed.
vertices -- a sequence of indices of generating vertices.
facets -- a sequence of indices of facets containing this face.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Construct a face.
TESTS:
sage: o = lattice_polytope.octahedron(2)
sage: o.faces()
[
[[3], [0], [2], [1]],
[[0, 3], [2, 3], [0, 1], [1, 2]]
]
|
Reduction function. Does not store data that can be relatively fast
recomputed.
TESTS:
sage: o = lattice_polytope.octahedron(2)
sage: f = o.facets()[0]
sage: fl = loads(f.dumps())
sage: f.vertices() == fl.vertices()
True
sage: f.facets() == fl.facets()
True
|
Return a string representation of this face.
TESTS:
sage: o = lattice_polytope.octahedron(3)
sage: f = o.facets()[0]
sage: f._repr_()
'[0, 1, 5]'
|
Return a sequence of indices of boundary lattice points of this face.
EXAMPLES:
Boundary lattice points of one of the facets of the 3-dimensional cube:
sage: o = lattice_polytope.octahedron(3)
sage: cube = o.polar()
sage: face = cube.facets()[0]
sage: face.boundary_points()
[0, 1, 2, 3, 11, 15, 21, 25]
|
Return a sequence of indices of facets containing this face.
EXAMPLES:
Facets containing one of the edges of the 3-dimensional octahedron:
sage: o = lattice_polytope.octahedron(3)
sage: edge = o.faces(dim=1)[0]
sage: edge.facets()
[0, 1]
Thus \code{edge} is the intersection of facets 0 and 1:
sage: edge
[1, 5]
sage: o.facets()[0]
[0, 1, 5]
sage: o.facets()[1]
[1, 3, 5]
|
Return a sequence of indices of interior lattice points of this face.
EXAMPLES:
Interior lattice points of one of the facets of the 3-dimensional cube:
sage: o = lattice_polytope.octahedron(3)
sage: cube = o.polar()
sage: face = cube.facets()[0]
sage: face.interior_points()
[18]
|
Return the number of boundary lattice points of this face.
EXAMPLES:
The number of boundary lattice points of one of the facets of
the 3-dimensional cube:
sage: o = lattice_polytope.octahedron(3)
sage: cube = o.polar()
sage: face = cube.facets()[0]
sage: face.nboundary_points()
8
|
Return the number of facets containing this face.
EXAMPLES:
The number of facets containing one of the edges of
the 3-dimensional octahedron:
sage: o = lattice_polytope.octahedron(3)
sage: edge = o.faces(dim=1)[0]
sage: edge.nfacets()
2
|
Return the number of interior lattice points of this face.
EXAMPLES:
The number of interior lattice points of one of the facets of
the 3-dimensional cube:
sage: o = lattice_polytope.octahedron(3)
sage: cube = o.polar()
sage: face = cube.facets()[0]
sage: face.ninterior_points()
1
|
Return the number of lattice points of this face.
EXAMPLES:
The number of lattice points of one of the facets of
the 3-dimensional cube:
sage: o = lattice_polytope.octahedron(3)
sage: cube = o.polar()
sage: face = cube.facets()[0]
sage: face.npoints()
9
|
Return the number of vertices generating this face.
EXAMPLES:
The number of vertices generating one of the facets of
the 3-dimensional cube:
sage: o = lattice_polytope.octahedron(3)
sage: cube = o.polar()
sage: face = cube.facets()[0]
sage: face.nvertices()
4
|
Return the list of indices of lattice points on the edge in their
geometric order, from one vertex to other.
Works only for edges, i.e. faces generated by exactly two vertices.
EXAMPLE:
We find all points along an edge of the cube:
sage: o = lattice_polytope.octahedron(3)
sage: c = o.polar()
sage: e = c.edges()[0]
sage: e.vertices()
[0, 1]
sage: e.ordered_points()
[0, 15, 1]
|
Return a sequence of indices of lattice points of this face.
EXAMPLES:
The lattice points of one of the facets of the 3-dimensional cube:
sage: o = lattice_polytope.octahedron(3)
sage: cube = o.polar()
sage: face = cube.facets()[0]
sage: face.points()
[0, 1, 2, 3, 11, 15, 18, 21, 25]
|
Return a list of indices of vertices of a 2-face in their boundary order.
Needed for plot3d function of polytopes.
EXAMPLES:
sage: c = lattice_polytope.octahedron(3).polar()
sage: f = c.facets()[0]
sage: f.vertices()
[0, 1, 2, 3]
sage: f.traverse_boundary()
[0, 2, 3, 1]
|
Return a sequence of indices of vertices generating this face.
EXAMPLES:
The vertices generating one of the facets of the 3-dimensional cube:
sage: o = lattice_polytope.octahedron(3)
sage: cube = o.polar()
sage: face = cube.facets()[0]
sage: face.vertices()
[0, 1, 2, 3]
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:40 2008 | http://epydoc.sourceforge.net |