Macaulay2 » Documentation
Packages » Polyhedra :: 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 : coneFromVData matrix {{0,0,-1,-1,1},{2,-2,1,-1,0},{1,1,1,1,0}}

    o1 = Cone{...1...}

    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 (coneFromVData)of a set of rays or as the intersection (coneFromHData) 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 = coneFromVData R

    o3 = C

    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 = coneFromVData(R,LS)

    o6 = C

    o6 : Cone

    i7 : rays C

    o7 = | 0  0 |
         | -1 1 |
         | 4  5 |

                  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 = coneFromHData HS

    o9 = C

    o9 : Cone

    i10 : rays C

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

                   3       3
    o10 : Matrix ZZ  <-- ZZ

    i11 : hyperplanesTmp = transpose LS

    o11 = | 1 1 -2 |

                   1       3
    o11 : Matrix ZZ  <-- ZZ

    i12 : C = coneFromHData(HS,hyperplanesTmp)

    o12 = C

    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:

- coneFromHData -- Constructing a polyhedral cone as intersection of halfspaces.
- coneFromVData -- computes the positive hull of rays, cones, and the cone over a polyhedron
- dualCone -- computes the dual Cone
- normalCone(Polyhedron,Polyhedron) -- computes the normal cone of a face of a polyhedron
- posOrthant -- generates the positive orthant in n-space
- tailCone -- computes the tail/recession cone of a polyhedron

## Methods that use a convex rational cone:

- `addCone(Cone,Fan)` -- see addCone -- adds cones to a Fan
- addCone(Fan,Cone) (missing documentation)
- `affineImage(Cone,Matrix)` -- see affineImage(Matrix,Cone,Matrix) -- computes the affine image of a cone
- `affineImage(Matrix,Cone)` -- see affineImage(Matrix,Cone,Matrix) -- computes the affine image of a cone
- affineImage(Matrix,Cone,Matrix) -- computes the affine image of a cone
- `affinePreimage(Cone,Matrix)` -- see affinePreimage(Matrix,Cone,Matrix) -- computes the affine preimage of a cone
- `affinePreimage(Matrix,Cone)` -- see affinePreimage(Matrix,Cone,Matrix) -- computes the affine preimage of a cone
- affinePreimage(Matrix,Cone,Matrix) -- computes the affine preimage of a cone
- `areCompatible(Cone,Cone)` -- see areCompatible -- checks if the intersection of two cones/polyhedra is a face of each
- `commonFace(Cone,Cone)` -- see commonFace -- checks if the intersection is a face of both Cones or Polyhedra, or of cones with fans
- `commonFace(Cone,Fan)` -- see commonFace -- checks if the intersection is a face of both Cones or Polyhedra, or of cones with fans
- `commonFace(Fan,Cone)` -- see commonFace -- checks if the intersection is a face of both Cones or Polyhedra, or of cones with fans
- Cone * Cone -- computes the direct product of two cones
- Cone * Polyhedron -- computes the direct product of a cone and a polyhedron
- Cone + Cone -- computes the Minkowski sum of two cones
- Cone + Polyhedron -- computes the Minkowski sum of a cone and a polyhedron
- Cone == Cone -- equality
- Cone ? Cone -- compares the Cones
- `coneFromVData(Cone,Cone)` -- see coneFromVData -- computes the positive hull of rays, cones, and the cone over a polyhedron
- `contains(Cone,Cone)` -- see contains -- checks if the first argument contains the second argument
- `contains(Cone,Matrix)` -- see contains -- checks if the first argument contains the second argument
- `contains(Cone,Polyhedron)` -- see contains -- checks if the first argument contains the second argument
- `contains(Fan,Cone)` -- see contains -- checks if the first argument contains the second argument
- `contains(List,Cone)` -- see contains -- checks if the first argument contains the second argument
- `contains(Polyhedron,Cone)` -- see contains -- checks if the first argument contains the second argument
- directProduct(Cone,Cone) -- computes the direct product of polyhedra and cones
- `directProduct(Cone,Polyhedron)` -- see directProduct(Cone,Cone) -- computes the direct product of polyhedra and cones
- `directProduct(Polyhedron,Cone)` -- see directProduct(Cone,Cone) -- computes the direct product of polyhedra and cones
- `dualCone(Cone)` -- see dualCone -- computes the dual Cone
- dualFaceRepresentationMap(Cone) (missing documentation)
- `facesAsCones(ZZ,Cone)` -- see facesAsCones -- Returns the faces of a cone as actual cones.
- `facets(Cone)` -- see facets -- Giving the facet inequalities of a cone or polyhedron.
- `fan(Cone)` -- see fan -- generates a Fan
- `halfspaces(Cone)` -- see halfspaces -- computes the defining half-spaces of a Cone or a Polyhedron
- `hilbertBasis(Cone)` -- see hilbertBasis -- computes the Hilbert basis of a Cone
- `hyperplanes(Cone)` -- see hyperplanes -- computes the defining hyperplanes of a Cone or a Polyhedron
- `imageFan(Matrix,Cone)` -- see imageFan -- computes the fan of the image
- `incompCones(Cone,Fan)` -- see incompCones -- returns the pairs of incompatible cones
- `incompCones(Fan,Cone)` -- see incompCones -- returns the pairs of incompatible cones
- `inInterior(Matrix,Cone)` -- see inInterior -- checks if a point lies in the relative interior of a Cone/Polyhedron
- `interiorVector(Cone)` -- see interiorVector -- computes a vector in the relative interior of a Cone
- `intersect(Cone,Cone)` -- see intersect -- computes the intersection of cones, and polyhedra
- `intersect(Cone,Polyhedron)` -- see intersect -- computes the intersection of cones, and polyhedra
- `intersect(Polyhedron,Cone)` -- see intersect -- computes the intersection of cones, and polyhedra
- `isFace(Cone,Cone)` -- see isFace -- tests if the first argument is a face of the second
- `isPointed(Cone)` -- see isPointed -- checks if a Cone or Fan is pointed
- isSmooth(Cone) -- checks if a Cone or Fan is smooth
- isWellDefined(Cone) -- Checks whether a polyhedral object is well-defined.
- `linSpace(Cone)` -- see linSpace -- Deprecated version of @TO "linealitySpace"@
- `maxFace(Matrix,Cone)` -- see maxFace -- computes the face of a Polyhedron or Cone where a weight attains its maximum
- `minFace(Matrix,Cone)` -- see minFace -- computes the face of a Polyhedron or Cone where a weight attains its minimum
- `minkowskiSum(Cone,Cone)` -- see minkowskiSum -- computes the Minkowski sum of two convex objects
- `minkowskiSum(Cone,Polyhedron)` -- see minkowskiSum -- computes the Minkowski sum of two convex objects
- `minkowskiSum(Polyhedron,Cone)` -- see minkowskiSum -- computes the Minkowski sum of two convex objects
- `polyhedron(Cone)` -- see polyhedron -- Turn a cone into a polyhedron
- Polyhedron * Cone -- computes the direct product of a polyhedron and a cone
- Polyhedron + Cone -- computes the Minkowski sum of a polyhedron and a cone
- `proximum(Matrix,Cone)` -- see proximum -- computes the proximum of the Polyhedron/Cone to a point in euclidean metric
- `smallestFace(Matrix,Cone)` -- see smallestFace -- determines the smallest face of the Cone/Polyhedron containing a point

## For the programmer

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

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Polyhedra/documentation/old_documentation.m2:273:0.