Macaulay2 » Documentation
Packages » Polyhedra :: coneFromVData
next | previous | forward | backward | up | index | toc

coneFromVData -- computes the positive hull of rays, cones, and the cone over a polyhedron

Synopsis

Description

Please see V- and H-representation on the conventions we use for cones and polyhedra.

coneFromVData computes the positive hull of the input. In the first two cases it considers the columns of M as a set of rays and the columns of N (if given) as generators of the lineality space and computes the cone that is the positive hull of the rays plus the lineality space. The two matrices must have the same number of rows, i.e. the columns must lie in the same ambient space. If N is not given or equal to 0 then the resulting cone is pointed. The rays need not be a minimal generating set of the cone. If two cones are inserted it computes their positive hull if they lie in the same ambient space. In the case of a polyhedron it computes the cone given by all positive multiples of points of the polyhedron. If applied to a list, it may contain a combination of the following in any order.

Then coneFromVData computes the positive hull of all inserted objects, if they are in the same ambient space, i.e. all matrices must have the same number of rows, which must equal the ambient dimension of all cones and polyhedra.

As a first example consider the following 2 dimensional cone in 3 space:
i1 : R = matrix {{1,2},{2,1},{0,0}}

o1 = | 1 2 |
     | 2 1 |
     | 0 0 |

              3       2
o1 : Matrix ZZ  <-- ZZ
i2 : C = coneFromVData R

o2 = C

o2 : Cone

We can construct a full dimensional cone out of this one by adding a lineality space for example:
i3 : LS = matrix {{0},{0},{1}}

o3 = | 0 |
     | 0 |
     | 1 |

              3       1
o3 : Matrix ZZ  <-- ZZ
i4 : C1 = coneFromVData (R,LS)

o4 = C1

o4 : Cone

The resulting cone is not pointed anymore, because it contains the subspace spanned by (0,0,1). To get a full dimensional pointed cone we have to add another ray to C. For this we can apply coneFromVData to a list containing C and the new ray:
i5 : r = matrix {{0},{1},{2}}

o5 = | 0 |
     | 1 |
     | 2 |

              3       1
o5 : Matrix ZZ  <-- ZZ
i6 : C2 = coneFromVData {C,r}

o6 = C2

o6 : Cone

Another way would be, if we would have r not as a ray but already as a cone:
i7 : r = coneFromVData r

o7 = r

o7 : Cone

In this case we can just take the positive hull of the two cones:
i8 : C3 = coneFromVData(C,r)

o8 = C3

o8 : Cone
i9 : C3 == C2

o9 = true

Ways to use coneFromVData :

For the programmer

The object coneFromVData is a method function.