Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 5802

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>posHull -- computes the positive hull of rays, cones, and the cone over a polyhedron</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_pos__Orthant.html">next</a> | <a href="_polytope.html">previous</a> | <a href="_pos__Orthant.html">forward</a> | <a href="_polytope.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<hr/>
<div><h1>posHull -- computes the positive hull of rays, cones, and the cone over a polyhedron</h1>
<div class="single"><h2>Synopsis</h2>
<ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt> C = posHull M </tt><br/><tt>C = posHull(M,N) </tt><br/><tt>C = posHull(C1,C2) </tt><br/><tt>C = posHull P </tt><br/><tt>C = posHull L</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>M</tt>, <span>a <a href="../../Macaulay2Doc/html/___Matrix.html">matrix</a></span>, with entries in<a href="../../Macaulay2Doc/html/___Z__Z.html" title="the class of all integers">ZZ</a> or <a href="../../Macaulay2Doc/html/___Q__Q.html" title="the class of all rational numbers">QQ</a></span></li>
<li><span><tt>N</tt>, <span>a <a href="../../Macaulay2Doc/html/___Matrix.html">matrix</a></span>, with entries in<a href="../../Macaulay2Doc/html/___Z__Z.html" title="the class of all integers">ZZ</a> or <a href="../../Macaulay2Doc/html/___Q__Q.html" title="the class of all rational numbers">QQ</a></span></li>
<li><span><tt>C1</tt>, <span>a <a href="___Cone.html">convex rational cone</a></span></span></li>
<li><span><tt>C2</tt>, <span>a <a href="___Cone.html">convex rational cone</a></span></span></li>
<li><span><tt>P</tt>, <span>a <a href="___Polyhedron.html">convex polyhedron</a></span></span></li>
<li><span><tt>L</tt>, <span>a <a href="../../Macaulay2Doc/html/___List.html">list</a></span></span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><tt>C</tt>, <span>a <a href="___Cone.html">convex rational cone</a></span></span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><p/>
<tt>posHull</tt> computes the positive hull of the input. In the 
 first two cases it considers the columns of <tt>M</tt> as a set of rays 
 and the columns of <tt>N</tt> (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 <tt>N</tt> 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.<ul><li>Rays, given by a matrix <tt>R</tt> over <a href="../../Macaulay2Doc/html/___Z__Z.html" title="the class of all integers">ZZ</a> 
 or <a href="../../Macaulay2Doc/html/___Q__Q.html" title="the class of all rational numbers">QQ</a></li>
<li>Rays and a lineality space, given by a sequence <tt>(R,LS)</tt> of two 
 matrices over <a href="../../Macaulay2Doc/html/___Z__Z.html" title="the class of all integers">ZZ</a> or <a href="../../Macaulay2Doc/html/___Q__Q.html" title="the class of all rational numbers">QQ</a></li>
<li><a href="___Cone.html" title="the class of all rational convex polyhedral cones">Cone</a></li>
<li><a href="___Polyhedron.html" title="the class of all convex polyhedra">Polyhedron</a></li>
</ul>
<p/>
Then <tt>posHull</tt> 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.<p/>
As a first example consider the following 2 dimensional cone in 3 space:<table class="examples"><tr><td><pre>i1 : R = matrix {{1,2},{2,1},{0,0}}

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

              3        2
o1 : Matrix ZZ  &lt;--- ZZ</pre>
</td></tr>
<tr><td><pre>i2 : C = posHull R

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

o2 : Cone</pre>
</td></tr>
</table>
<p/>
We can construct a full dimensional cone out of this one by adding a lineality 
 space for example:<table class="examples"><tr><td><pre>i3 : LS = matrix {{0},{0},{1}}

o3 = | 0 |
     | 0 |
     | 1 |

              3        1
o3 : Matrix ZZ  &lt;--- ZZ</pre>
</td></tr>
<tr><td><pre>i4 : C1 = posHull (R,LS)

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

o4 : Cone</pre>
</td></tr>
</table>
<p/>
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 <tt>posHull</tt> to a list containing <tt>C</tt> and the new ray:<table class="examples"><tr><td><pre>i5 : r = matrix {{0},{1},{2}}

o5 = | 0 |
     | 1 |
     | 2 |

              3        1
o5 : Matrix ZZ  &lt;--- ZZ</pre>
</td></tr>
<tr><td><pre>i6 : C2 = posHull {C,r}

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

o6 : Cone</pre>
</td></tr>
</table>
<p/>
Another way would be, if we would have <tt>r</tt> not as a ray but already as 
 a cone:<table class="examples"><tr><td><pre>i7 : r = posHull r

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

o7 : Cone</pre>
</td></tr>
</table>
<p/>
In this case we can just take the positive hull of the two cones:<table class="examples"><tr><td><pre>i8 : C3 = posHull(C,r)

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

o8 : Cone</pre>
</td></tr>
<tr><td><pre>i9 : C3 == C2

o9 = true</pre>
</td></tr>
</table>
</div>
</div>
<div class="waystouse"><h2>Ways to use <tt>posHull</tt> :</h2>
<ul><li>posHull(Cone,Cone)</li>
<li>posHull(List)</li>
<li>posHull(Matrix)</li>
<li>posHull(Matrix,Matrix)</li>
<li>posHull(Polyhedron)</li>
</ul>
</div>
</div>
</body>
</html>