next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Polyhedra :: hypercube

hypercube -- computes the d-dimensional hypercube with edge length 2*s

Synopsis

Description

The d-dimensional hypercube with edge length 2*s is the convex hull of all points in {+/- s}^d in QQ^d. If s is omitted it is set to 1.

i1 : P = hypercube 3

o1 = P

o1 : Polyhedron
i2 : vertices P

o2 = | -1 1  -1 1  -1 1  -1 1 |
     | -1 -1 1  1  -1 -1 1  1 |
     | -1 -1 -1 -1 1  1  1  1 |

              3        8
o2 : Matrix QQ  <--- QQ

Ways to use hypercube :