Macaulay2 » Documentation
Packages » OldPolyhedra :: smallestFace
next | previous | forward | backward | up | index | toc

# smallestFace -- determines the smallest face of the Cone/Polyhedron containing a point

- Usage:
    `C1 = smallestFace(p,C)`
    `P1 = smallestFace(p,P)`
- Inputs:
  - p, a matrix, over ZZ or QQ with only one column representing a point
  - C, a convex rational cone
  - P, a convex polyhedron
- Outputs:
  - C1, a convex rational cone, or
  - P1, a convex polyhedron

## Description

p is considered to be a point in the ambient space of the second argument, so the number of rows of p must equal the dimension of the ambient space of the second argument. The function computes the smallest face of the second argument that contains p. If the second argument is a Polyhedron the output is a Polyhedron and if it is a Cone the output is a Cone. In both cases, if the point is not contained in the second argument then the output is the empty polyhedron.

    i1 : P = hypercube 3

    o1 = {ambient dimension => 3           }
          dimension of lineality space => 0
          dimension of polyhedron => 3
          number of facets => 6
          number of rays => 0
          number of vertices => 8

    o1 : Polyhedron

    i2 : p = matrix {{1},{0},{0}}

    o2 = | 1 |
         | 0 |
         | 0 |

                  3       1
    o2 : Matrix ZZ  <-- ZZ

    i3 : smallestFace(p,P)

    o3 = {ambient dimension => 3           }
          dimension of lineality space => 0
          dimension of polyhedron => 2
          number of facets => 4
          number of rays => 0
          number of vertices => 4

    o3 : Polyhedron

## Ways to use smallestFace:

- `smallestFace(Matrix,Cone)`
- `smallestFace(Matrix,Polyhedron)`

## For the programmer

The object smallestFace is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/OldPolyhedra.m2:6645:0.