next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Polyhedra :: latticePoints

latticePoints -- computes the lattice points of a polytope

Synopsis

Description

latticePoints can only be applied to polytopes, i.e. compact polyhedra. It embeds the polytope on height 1 in a space of dimension plus 1 and takes the Cone over this polytope. Then it projects the elements of height 1 of the Hilbert basis back again.

i1 : P = crossPolytope 3

o1 = P

o1 : Polyhedron
i2 : latticePoints P

o2 = {0, | 1 |, | 0 |, | 0 |, | -1 |, | 0  |, | 0  |}
         | 0 |  | 1 |  | 0 |  | 0  |  | -1 |  | 0  |
         | 0 |  | 0 |  | 1 |  | 0  |  | 0  |  | -1 |

o2 : List
i3 : Q = cyclicPolytope(2,4)

o3 = Q

o3 : Polyhedron
i4 : latticePoints Q

o4 = {0, | 3 |, | 1 |, | 1 |, | 2 |, | 1 |, | 2 |, | 2 |}
         | 9 |  | 1 |  | 2 |  | 4 |  | 3 |  | 5 |  | 6 |

o4 : List

Ways to use latticePoints :

For the programmer

The object latticePoints is a method function.