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

Cone -- the class of all rational convex polyhedral cones

Description

A Cone represents a rational convex polyhedral cone. It need not be full dimensional or may contain a proper linear subspace. It can be zero dimensional, i.e. the origin. It is saved as a hash table which contains the generating rays and the basis of the lineality space of the cone as well as the defining half-spaces and hyperplanes. The output of a Cone looks like this:
i1 : posHull matrix {{0,0,-1,-1,1},{2,-2,1,-1,0},{1,1,1,1,0}}

o1 = {ambient dimension => 3           }
      dimension of lineality space => 0
      dimension of the cone => 3
      number of facets => 5
      number of rays => 5

o1 : Cone

This table displays a short summary of the properties of the Cone. The number of rays is modulo the lineality space. However, one can not access the above information directly, because this is just a virtual hash table generated for the output. The data describing a Cone is extracted by the functions included in this package. A Cone can be constructed as the positive hull (posHull)of a set of rays or as the intersection (intersection) of a set of linear half-spaces and linear hyperplanes.

As examples for the positive hull consider the following cones:
i2 : R = matrix{{1,2,3,1},{2,3,1,1},{3,1,2,1}}

o2 = | 1 2 3 1 |
     | 2 3 1 1 |
     | 3 1 2 1 |

              3       4
o2 : Matrix ZZ  <-- ZZ
i3 : C = posHull R

o3 = {ambient dimension => 3           }
      dimension of lineality space => 0
      dimension of the cone => 3
      number of facets => 3
      number of rays => 3

o3 : Cone
i4 : rays C

o4 = | 2 3 1 |
     | 3 1 2 |
     | 1 2 3 |

              3       3
o4 : Matrix ZZ  <-- ZZ
i5 : LS = matrix{{1},{1},{-2}}

o5 = | 1  |
     | 1  |
     | -2 |

              3       1
o5 : Matrix ZZ  <-- ZZ
i6 : C = posHull(R,LS)

o6 = {ambient dimension => 3           }
      dimension of lineality space => 1
      dimension of the cone => 3
      number of facets => 2
      number of rays => 2

o6 : Cone
i7 : rays C

o7 = | 3 3 |
     | 1 5 |
     | 2 4 |

              3       2
o7 : Matrix ZZ  <-- ZZ

On the other hand, we can use these matrices as defining half-spaces and hyperplanes for the intersection:
i8 : HS = transpose R

o8 = | 1 2 3 |
     | 2 3 1 |
     | 3 1 2 |
     | 1 1 1 |

              4       3
o8 : Matrix ZZ  <-- ZZ
i9 : C = intersection HS

o9 = {ambient dimension => 3           }
      dimension of lineality space => 0
      dimension of the cone => 3
      number of facets => 3
      number of rays => 3

o9 : Cone
i10 : rays C

o10 = | 1  7  -5 |
      | 7  -5 1  |
      | -5 1  7  |

               3       3
o10 : Matrix ZZ  <-- ZZ
i11 : HP = transpose LS

o11 = | 1 1 -2 |

               1       3
o11 : Matrix ZZ  <-- ZZ
i12 : C = intersection(HS,HP)

o12 = {ambient dimension => 3           }
       dimension of lineality space => 0
       dimension of the cone => 2
       number of facets => 2
       number of rays => 2

o12 : Cone
i13 : rays C

o13 = | 7  -2 |
      | -5 4  |
      | 1  1  |

               3       2
o13 : Matrix ZZ  <-- ZZ

See alsoWorking with cones.

Functions and methods returning a convex rational cone :

Methods that use a convex rational cone :

For the programmer

The object Cone is a type, with ancestor classes PolyhedralObject < HashTable < Thing.