@cindex polymake_so @table @asis @item @strong{Library:} polymake.so @item @strong{Purpose:} Access to polymake on singular interpreter level. @item @strong{Author:} Yue Ren, email: ren@@mathematik.uni-kl.de @item @strong{Installation and Usage:} In order to use the Polymake interface in Singular, Singular needs to be build from sources. Please check the readme file for installation instructions. After having built Singular with Polymake interface, start Singular in the system folder (e.g. x86_64-Linux). You can load the polymake interface via @* @code{LIB ``polymake.so'';} @item @strong{Note:} A working installation of the newest polymake version, version 2.12, is needed. Some procedures will not work unless the required third-party software is installed. For more detailed information please consult the polymake homepage. All credits go to @example polymake Copyright (c) 1997-2012 by Ewgenij Gawrilow, Michael Joswig (TU Darmstadt) http://www.polymake.org @end example and respective third-party software. @end table @strong{List of accessible functions:} All functions are to be called with a preceding ``Polymake::''. @menu * boundaryLatticePoints:: * ehrhartPolynomialCoeff:: * facetVertexLatticeDistances:: * facetWidth:: * facetWidths:: * fVector(polymake):: * gorensteinIndex:: * gorensteinVector:: * hilbertBasis:: * hStarVector:: * hVector:: * interiorLatticePoints:: * isBounded:: * isCanonical:: * isCompressed:: * isGorenstein:: * isLatticeEmpty:: * isNormal:: * isReflexive:: * isSmooth:: * isTerminal:: * isVeryAmple:: * latticeCodegree:: * latticeDegree:: * latticePoints:: * latticeVolume:: * maximalFace:: * maximalValue:: * minimalFace:: * minimalValue:: * minkowskiSum:: * nBoundaryLatticePoints:: * nHilbertBasis:: * nInteriorLatticePoints:: * nLatticePoints:: * normalFan(polymake):: * visual:: @end menu @c -------------------------------------------------------------------------------- @node boundaryLatticePoints,ehrhartPolynomialCoeff,,polymake_so @subsubsection boundaryLatticePoints @cindex boundaryLatticePoints @table @code @item @strong{Syntax:} @code{Polymake::boundaryLatticePoints(} polytope p @code{)} @item @strong{Assume:} p bounded @item @strong{Type:} intmat @item @strong{Purpose:} intmat, whose rows are the lattice points on the relative boundary of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,2,-1, 1,-1,2, 1,-1,-1; polytope p = polytopeViaPoints(M); Polymake::boundaryLatticePoints(p); intmat N[2][3]=1,2,0, 1,0,2; polytope q = polytopeViaPoints(N); Polymake::boundaryLatticePoints(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node ehrhartPolynomialCoeff,facetVertexLatticeDistances,boundaryLatticePoints,polymake_so @subsubsection ehrhartPolynomialCoeff @cindex ehrhartPolynomialCoeff @table @code @item @strong{Syntax:} @code{Polymake::ehrhartPolynomialCoeff(} polytope p @code{)} @item @strong{Assume:} p bounded @item @strong{Type:} intvec @item @strong{Purpose:} coefficients of the Ehrhart polynomial of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4]=1,1,1,2, 1,-1,-1,-2, 1,1,0,0, 1,-1,0,0, 1,0,1,0, 1,0,-1,0; polytope p = polytopeViaPoints(M); Polymake::ehrhartPolynomialCoeff(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node facetVertexLatticeDistances,facetWidth,ehrhartPolynomialCoeff,polymake_so @subsubsection facetVertexLatticeDistances @cindex facetVertexLatticeDistances @table @code @item @strong{Syntax:} @code{Polymake::facetVertexLatticeDistances(} polytope p @code{)} @item @strong{Assume:} p bounded @item @strong{Type:} intmat @item @strong{Purpose:} intmat, which encodes the lattice distances between vertices (columns) and facets (rows) of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,2,0, 1,0,1, 1,2,1, 1,0,0; polytope p = polytopeViaPoints(M); intmat D = Polymake::facetVertexLatticeDistances(p); D; @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node facetWidth,facetWidths,facetVertexLatticeDistances,polymake_so @subsubsection facetWidth @cindex facetWidth @table @code @item @strong{Syntax:} @code{Polymake::facetWidth(} polytope p @code{)} @item @strong{Assume:} p bounded @item @strong{Type:} int @item @strong{Purpose:} maximal integral width going over all facet normals @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,2,0, 1,0,1, 1,2,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::facetWidth(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node facetWidths,fVector(polymake),facetWidth,polymake_so @subsubsection facetWidths @cindex facetWidths @table @code @item @strong{Syntax:} @code{Polymake::facetWidths(} polytope p @code{)} @item @strong{Assume:} p bounded @item @strong{Type:} intvec @item @strong{Purpose:} vector with the integral widths of p with respect to all facet normals @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,2,0, 1,0,1, 1,2,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::facetWidths(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node fVector(polymake),gorensteinIndex,facetWidths,polymake_so @subsubsection fVector @cindex fVector(polymake) @table @code @item @strong{Syntax:} @code{Polymake::fVector(} polytope p @code{)} @item @strong{Type:} intvec @item @strong{Purpose:} the f-vector of p. @item @strong{Note:} the computation works via an f-vector computation of a cone whose intersection with a hyperplan yields p, hence the return might not make sense intuitively if p is not bounded. However it can be regarded as the f-vector of p in (R')^n, where R' denotes the two point compactification of R and n is the dimension of the ambient space of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4]=1,1,1,2, 1,-1,-1,-2, 1,1,0,0, 1,-1,0,0, 1,0,1,0, 1,0,-1,0; polytope p = polytopeViaPoints(M); Polymake::fVector(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node gorensteinIndex,gorensteinVector,fVector(polymake),polymake_so @subsubsection gorensteinIndex @cindex gorensteinIndex @table @code @item @strong{Syntax:} @code{Polymake::gorensteinIndex(} polytope p @code{)} @item @strong{Assume:} p is Gorenstein, i.e. n*p+v is reflexive for some dilatation n and translation v. @item @strong{Type:} int @item @strong{Purpose:} returns a factor n such that n*p+v is reflexive for some translation v. @item @strong{Note:} you can check whether p is Gorenstein by Polymake::isGorenstein(p); the translation v can be computed via Polymake::gorensteinVector(p). @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,1,0, 1,0,1, 1,0,0, 1,1,1; polytope p = polytopeViaPoints(M); Polymake::gorensteinIndex(p); intmat N[3][3]=1,2,0, 1,0,2, 1,-2,-2; polytope q = polytopeViaPoints(N); Polymake::gorensteinIndex(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node gorensteinVector,hilbertBasis,gorensteinIndex,polymake_so @subsubsection gorensteinVector @cindex gorensteinVector @table @code @item @strong{Syntax:} @code{Polymake::gorensteinVector(} polytope p @code{)} @item @strong{Assume:} p is Gorenstein, i.e. n*p+v is reflexive for some dilatation n and translation v. @item @strong{Type:} intvec @item @strong{Purpose:} returns a vector v such that n*p+v is reflexive for some dilatation v. @item @strong{Note:} you can check whether p is Gorenstein by Polymake::isGorenstein(p); the dilatation n can be computed via Polymake::gorensteinIndex(p). @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,1,0, 1,0,1, 1,0,0, 1,1,1; polytope p = polytopeViaPoints(M); Polymake::gorensteinVector(p); intmat N[3][3]=1,2,0, 1,0,2, 1,-2,-2; polytope q = polytopeViaPoints(N); Polymake::gorensteinVector(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node hilbertBasis,hStarVector,gorensteinVector,polymake_so @subsubsection hilbertBasis @cindex hilbertBasis @table @code @item @strong{Syntax:} @code{Polymake::hilbertBasis(} cone c @code{)} @item @strong{Type:} intmat @item @strong{Purpose:} intmat, whose rows are the Hilbert basis of the semigroup of lattice points in c. @item @strong{Note:} the number of elements in the hilbertBasis can be computed through Polymake::nHilbertBasis(c). @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,2,-1, 1,-1,2, 1,-1,-1; cone c = coneViaRays(M); Polymake::hilbertBasis(c); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node hStarVector,hVector,hilbertBasis,polymake_so @subsubsection hStarVector @cindex hStarVector @table @code @item @strong{Syntax:} @code{Polymake::hStarVector(} polytope p @code{)} @item @strong{Type:} intvec @item @strong{Purpose:} the h*-vector of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4]=1,1,1,2, 1,-1,-1,-2, 1,1,0,0, 1,-1,0,0, 1,0,1,0, 1,0,-1,0; polytope p = polytopeViaPoints(M); Polymake::hStarVector(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node hVector,interiorLatticePoints,hStarVector,polymake_so @subsubsection hVector @cindex hVector @table @code @item @strong{Syntax:} @code{Polymake::hVector(} polytope p @code{)} @item @strong{Type:} intvec @item @strong{Purpose:} the h-vector of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4]=1,1,1,2, 1,-1,-1,-2, 1,1,0,0, 1,-1,0,0, 1,0,1,0, 1,0,-1,0; polytope p = polytopeViaPoints(M); Polymake::hVector(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node interiorLatticePoints,isBounded,hVector,polymake_so @subsubsection interiorLatticePoints @cindex interiorLatticePoints @table @code @item @strong{Syntax:} @code{Polymake::interiorLatticePoints(} polytope p @code{)} @item @strong{Type:} intmat @item @strong{Purpose:} intmat, whose rows are the lattice points in the relative interior of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,2,-1, 1,-1,2, 1,-1,-1; polytope p = polytopeViaPoints(M); Polymake::interiorLatticePoints(p); intmat N[2][3]=1,2,0, 1,0,2; polytope q = polytopeViaPoints(N); Polymake::interiorLatticePoints(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isBounded,isCanonical,interiorLatticePoints,polymake_so @subsubsection isBounded @cindex isBounded @table @code @item @strong{Syntax:} @code{Polymake::isBounded(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if p is bounded, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][4]=1,1,0,0, 1,0,1,0, 1,0,0,1, 1,-1,-1,-1; polytope p = polytopeViaPoints(M); Polymake::isBounded(p); M=1,1,0,0, 1,0,1,0, 0,0,0,1, 1,-1,-1,-1; p = polytopeViaPoints(M); Polymake::isBounded(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isCanonical,isCompressed,isBounded,polymake_so @subsubsection isCanonical @cindex isCanonical @table @code @item @strong{Syntax:} @code{Polymake::isCanonical(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if p has exactly one interior lattice point, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4]=1,1,1,2, 1,-1,-1,-2, 1,1,0,0, 1,-1,0,0, 1,0,1,0, 1,0,-1,0; polytope p = polytopeViaPoints(M); Polymake::isCanonical(p); Polymake::isReflexive(p); intmat N[3][3]=1,2,0, 1,0,2, 1,-2,-2; polytope q = polytopeViaPoints(N); Polymake::isCanonical(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isCompressed,isGorenstein,isCanonical,polymake_so @subsubsection isCompressed @cindex isCompressed @table @code @item @strong{Syntax:} @code{Polymake::isCompressed(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if p has maximal facet width 1, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,2,0, 1,0,1, 1,2,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::isCompressed(p); intmat N[4][3]=1,1,0, 1,0,1, 1,1,1, 1,0,0; polytope q = polytopeViaPoints(N); Polymake::isCompressed(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isGorenstein,isLatticeEmpty,isCompressed,polymake_so @subsubsection isGorenstein @cindex isGorenstein @table @code @item @strong{Syntax:} @code{Polymake::isGorenstein(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if p is Gorenstein, i.e. reflexive after dilitation and translation, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,1,0, 1,0,1, 1,0,0, 1,1,1; polytope p = polytopeViaPoints(M); Polymake::isGorenstein(p); intmat N[3][3]=1,2,0, 1,0,2, 1,-2,-2; polytope q = polytopeViaPoints(N); Polymake::isGorenstein(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isLatticeEmpty,isNormal,isGorenstein,polymake_so @subsubsection isLatticeEmpty @cindex isLatticeEmpty @table @code @item @strong{Syntax:} @code{Polymake::isLatticeEmpty(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if p contains no lattice points other than the vertices, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,1,0, 1,1,1, 1,0,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::isLatticeEmpty(p); intmat N[4][3]=1,1,0, 1,2,1, 1,0,1, 1,0,0; polytope q = polytopeViaPoints(N); Polymake::isLatticeEmpty(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isNormal,isReflexive,isLatticeEmpty,polymake_so @subsubsection isNormal @cindex isNormal @table @code @item @strong{Syntax:} @code{Polymake::isNormal(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if the projective toric variety defined by p is projectively normal, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4]=1,1,1,2, 1,-1,-1,-2, 1,1,0,0, 1,-1,0,0, 1,0,1,0, 1,0,-1,0; polytope p = polytopeViaPoints(M); Polymake::isNormal(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isReflexive,isSmooth,isNormal,polymake_so @subsubsection isReflexive @cindex isReflexive @table @code @item @strong{Syntax:} @code{Polymake::isReflexive(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if p is reflexive, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][4]=1,1,0,0, 1,0,1,0, 1,0,0,1, 1,-1,-1,-1; polytope p = polytopeViaPoints(M); Polymake::isReflexive(p); M=1,2,0,0, 1,0,2,0, 1,0,0,2, 1,-2,-2,-2; p = polytopeViaPoints(M); Polymake::isReflexive(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isSmooth,isTerminal,isReflexive,polymake_so @subsubsection isSmooth @cindex isSmooth @table @code @item @strong{Syntax:} @code{Polymake::isSmooth(} cone c @code{)} @*@code{Polymake::isSmooth(} fan f @code{)} @*@code{Polymake::isSmooth(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if c, f or p is smooth, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[2][2]=1,0, 0,1; cone c1 = coneViaRays(M); Polymake::isSmooth(c1); intmat N[3][3]=1,0, 1,2; cone c2 = coneViaRays(N); Polymake::isSmooth(c2); intmat M[2][2]=1,0, 0,1; cone c = coneViaRays(M); fan F1 = emptyFan(2); insertCone(F1,c); Polymake::isSmooth(F1); intmat N[3][3]=1,-2,-3, 1,1,0, 1,0,1; polytope q = polytopeViaPoints(N); fan F2 = Polymake::normalFan(q); Polymake::isSmooth(F2); intmat M[4][3]=1,2,0, 1,0,1, 1,2,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::isSmooth(p); intmat N[3][3]=1,-2,-3, 1,1,0, 1,0,1; polytope q = polytopeViaPoints(N); Polymake::isSmooth(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isTerminal,isVeryAmple,isSmooth,polymake_so @subsubsection isTerminal @cindex isTerminal @table @code @item @strong{Syntax:} @code{Polymake::isTerminal(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if p has exactly one interior lattice point and all other lattice points are vertices, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4]=1,1,1,2, 1,-1,-1,-2, 1,1,0,0, 1,-1,0,0, 1,0,1,0, 1,0,-1,0; polytope p = polytopeViaPoints(M); Polymake::isTerminal(p); Polymake::isReflexive(p); intmat N[6][4]=1,1,1,2, 1,-1,-1,-2, 1,1,1,0, 1,-1,-1,0, 1,-1,1,0, 1,1,-1,0; polytope q = polytopeViaPoints(N); Polymake::isTerminal(q); Polymake::isCanonical(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node isVeryAmple,latticeCodegree,isTerminal,polymake_so @subsubsection isVeryAmple @cindex isVeryAmple @table @code @item @strong{Syntax:} @code{Polymake::isVeryAmple(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} 1 if p is very ample, 0 otherwise. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,1,0, 1,0,1, 1,-1,-1; polytope p = polytopeViaPoints(M); Polymake::isVeryAmple(p); intmat N[3][4]=1,1,0,0, 1,0,1,0, 1,1,1,2; polytope p = polytopeViaPoints(N); Polymake::isVeryAmple(p); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node latticeCodegree,latticeDegree,isVeryAmple,polymake_so @subsubsection latticeCodegree @cindex latticeCodegree @table @code @item @strong{Syntax:} @code{Polymake::latticeCodegree(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} getDimension(p)+1-latticeDegree(p), which is the smallest number k such that k*p has an interior lattice point. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,1,0, 1,1,1, 1,0,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::latticeCodegree(p); intmat N[4][4]=1,1,0,0, 1,0,1,0, 1,0,0,1, 1,0,0,0; polytope q = polytopeViaPoints(N); Polymake::latticeCodegree(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node latticeDegree,latticePoints,latticeCodegree,polymake_so @subsubsection latticeDegree @cindex latticeDegree @table @code @item @strong{Syntax:} @code{Polymake::latticeDegree(} polytope p @code{)} @item @strong{Type:} int @item @strong{Purpose:} getDimension(p)+1-latticeCodegree(p), which is the degree of the Ehrhart polynomial of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,1,0, 1,1,1, 1,0,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::latticeDegree(p); intmat N[4][4]=1,1,0,0, 1,0,1,0, 1,0,0,1, 1,0,0,0; polytope q = polytopeViaPoints(N); Polymake::latticeDegree(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node latticePoints,latticeVolume,latticeDegree,polymake_so @subsubsection latticePoints @cindex latticePoints @table @code @item @strong{Syntax:} @code{Polymake::latticePoints(} polytope p @code{)} @item @strong{Assume:} p bounded. @item @strong{Type:} intmat @item @strong{Purpose:} intmat, whose rows are the lattice points in p. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,1,0, 1,1,1, 1,0,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::latticeDegree(p); intmat N[4][4]=1,1,0,0, 1,0,1,0, 1,0,0,1, 1,0,0,0; polytope q = polytopeViaPoints(N); Polymake::latticeDegree(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node latticeVolume,maximalFace,latticePoints,polymake_so @subsubsection latticeVolume @cindex latticeVolume @table @code @item @strong{Syntax:} @code{Polymake::latticeVolume(} polytope p @code{)} @item @strong{Assume:} p bounded. @item @strong{Type:} int @item @strong{Purpose:} the lattice volume of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[4][3]=1,1,0, 1,1,1, 1,0,1, 1,0,0; polytope p = polytopeViaPoints(M); Polymake::latticeVolume(p); intmat N[4][3]=1,1,0, 1,2,1, 1,0,1, 1,0,0; polytope q = polytopeViaPoints(N); Polymake::latticeVolume(q); intmat W[4][4]=1,1,0,0, 1,0,1,0, 1,0,0,1, 1,0,0,0; polytope r = polytopeViaPoints(W); Polymake::latticeVolume(r); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node maximalFace,maximalValue,latticeVolume,polymake_so @subsubsection maximalFace @cindex maximalFace @table @code @item @strong{Syntax:} @code{Polymake::maximalFace(} polytope p, intvec v @code{)} @item @strong{Assume:} v lies in the negative dual tail cone of p. @item @strong{Type:} intmat @item @strong{Purpose:} intmat, whose rows are the vertices of the face of p on which the linear form v is maximal. @item @strong{Note:} The first coordinate of v corresponds to a shift of the maximal value since p is considered as a polytope in the plane (first coordinate) = 1. Hence the maximal face is independent of the first coordinate of v. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,1,0, 1,0,1, 1,-1,-1; intvec v = 0,1,1; polytope p = polytopeViaPoints(M); Polymake::maximalFace(p,v); v = -5,1,1; Polymake::maximalFace(p,v); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node maximalValue,minimalFace,maximalFace,polymake_so @subsubsection maximalValue @cindex maximalValue @table @code @item @strong{Syntax:} @code{Polymake::maximalValue(} polytope p, intvec v @code{)} @item @strong{Assume:} v lies in the negative dual tail cone of p. @item @strong{Type:} int @item @strong{Purpose:} the maximal value of the linear form v on p. @item @strong{Note:} The first coordinate of v corresponds to a shift of the maximal value since p is considered as a polytope in the plane (first coordinate) = 1. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,1,0, 1,0,1, 1,-1,-1; intvec v = 0,1,1; polytope p = polytopeViaPoints(M); Polymake::maximalValue(p,v); v = -5,1,1; Polymake::maximalValue(p,v); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node minimalFace,minimalValue,maximalValue,polymake_so @subsubsection minimalFace @cindex minimalFace @table @code @item @strong{Syntax:} @code{Polymake::minimalFace(} polytope p, intvec v @code{)} @item @strong{Assume:} v lies in the dual tail cone of p. @item @strong{Type:} intmat @item @strong{Purpose:} intmat, whose rows are the vertices of the face of p on which the linear form v is minimal. @item @strong{Note:} The first coordinate of v corresponds to a shift of the minimal value since p is considered as a polytope in the plane (first coordinate) = 1. Hence the minimal face is independent of the first coordinate of v. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,1,0, 1,0,1, 1,-1,-1; intvec v = 0,1,1; polytope p = polytopeViaPoints(M); Polymake::maximalValue(p,v); v = -5,1,1; Polymake::maximalValue(p,v); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node minimalValue,minkowskiSum,minimalFace,polymake_so @subsubsection minimalValue @cindex minimalValue @table @code @item @strong{Syntax:} @code{Polymake::minimalValue(} polytope p, intvec v @code{)} @item @strong{Assume:} v lies in the dual tail cone of p. @item @strong{Type:} int @item @strong{Purpose:} the minimal value of the linear form v on p. @item @strong{Note:} The first coordinate of v corresponds to a shift of the minimal value since p is considered as a polytope in the plane (first coordinate) = 1. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,1,0, 1,0,1, 1,-1,-1; intvec v = 0,1,1; polytope p = polytopeViaPoints(M); Polymake::minimalValue(p,v); v = -5,1,1; Polymake::minimalValue(p,v); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node minkowskiSum,nBoundaryLatticePoints,minimalValue,polymake_so @subsubsection minkowskiSum @cindex minkowskiSum @table @code @item @strong{Syntax:} @code{Polymake::minkowskiSum(} polytope p, polytope q @code{)} @*@code{Polymake::minkowskiSum(} polytope p, cone c @code{)} @*@code{Polymake::minkowskiSum(} cone c, polytope q @code{)} @*@code{Polymake::minkowskiSum(} cone c, cone d @code{)} @item @strong{Assume:} same ambient dimension. @item @strong{Type:} polytope @item @strong{Purpose:} the Minkowski sum of the two input arguments. @item @strong{Note:} The Minkowski sum of two cones is just the cone generated by their union. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][4]=1,1,0,0, 1,0,1,0, 1,0,0,0; intmat N[3][4]=1,0,0,1, 1,-1,-1,-1, 1,0,0,0; polytope p = polytopeViaPoints(M); polytope q = polytopeViaPoints(N); polytope pq = Polymake::minkowskiSum(p,q); pq; @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node nBoundaryLatticePoints,nHilbertBasis,minkowskiSum,polymake_so @subsubsection nBoundaryLatticePoints @cindex nBoundaryLatticePoints @table @code @item @strong{Syntax:} @code{Polymake::nBoundaryLatticePoints(} polytope p @code{)} @item @strong{Assume:} p bounded. @item @strong{Type:} int @item @strong{Purpose:} the number of lattice points on the relative boundary of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,2,-1, 1,-1,2, 1,-1,-1; polytope p = polytopeViaPoints(M); Polymake::nBoundaryLatticePoints(p); intmat N[2][3]=1,2,0, 1,0,2; polytope q = polytopeViaPoints(N); Polymake::nBoundaryLatticePoints(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node nHilbertBasis,nInteriorLatticePoints,nBoundaryLatticePoints,polymake_so @subsubsection nHilbertBasis @cindex nHilbertBasis @table @code @item @strong{Syntax:} @code{Polymake::nHilbertBasis(} cone c @code{)} @item @strong{Type:} int @item @strong{Purpose:} the number of elements in the Hilbert basis of the semigroup of lattice points in c. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][4]=1,1,0,0, 1,0,1,0, 1,0,0,0; intmat N[3][4]=1,0,0,1, 1,-1,-1,-1, 1,0,0,0; polytope p = polytopeViaPoints(M); polytope q = polytopeViaPoints(N); polytope pq = Polymake::minkowskiSum(p,q); pq; @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node nInteriorLatticePoints,nLatticePoints,nHilbertBasis,polymake_so @subsubsection nInteriorLatticePoints @cindex nInteriorLatticePoints @table @code @item @strong{Syntax:} @code{Polymake::nInteriorLatticePoints(} polytope p @code{)} @item @strong{Assume:} p bounded. @item @strong{Type:} int @item @strong{Purpose:} the number of lattice points in the relative interior of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,2,-1, 1,-1,2, 1,-1,-1; polytope p = polytopeViaPoints(M); Polymake::nInteriorLatticePoints(p); intmat N[2][3]=1,2,0, 1,0,2; polytope q = polytopeViaPoints(N); Polymake::nInteriorLatticePoints(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node nLatticePoints,normalFan(polymake),nInteriorLatticePoints,polymake_so @subsubsection nLatticePoints @cindex nLatticePoints @table @code @item @strong{Syntax:} @code{Polymake::nLatticePoints(} polytope p @code{)} @item @strong{Assume:} p bounded. @item @strong{Type:} int @item @strong{Purpose:} the number of lattice points in p. @item @strong{Example:} @smallexample @c example no_comp intmat M[3][3]=1,2,-1, 1,-1,2, 1,-1,-1; polytope p = polytopeViaPoints(M); Polymake::nLatticePoints(p); intmat N[2][3]=1,2,0, 1,0,2; polytope q = polytopeViaPoints(N); Polymake::nLatticePoints(q); @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node normalFan(polymake),visual,nLatticePoints,polymake_so @subsubsection normalFan @cindex normalFan @table @code @item @strong{Syntax:} @code{Polymake::normalFan(} polytope p @code{)} @item @strong{Type:} fan @item @strong{Purpose:} the normal fan of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4] = 1,1,0,0, 1,0,1,0, 1,0,-1,0, 1,0,0,1, 1,0,0,-1, 1,-1,0,0; polytope p = Polymake::polytopeViaPoints(M); fan f = normalFan(p); f; @c example @end smallexample @end table @c -------------------------------------------------------------------------------- @node visual,,normalFan(polymake),polymake_so @subsubsection visual @cindex visual @table @code @item @strong{Syntax:} @code{Polymake::visual(} fan f @code{)} @*@code{Polymake::visual(} polytope p @code{)} @item @strong{Type:} fan @item @strong{Purpose:} the normal fan of p. @item @strong{Example:} @smallexample @c example no_comp intmat M[6][4] = 1,1,0,0, 1,0,1,0, 1,0,-1,0, 1,0,0,1, 1,0,0,-1, 1,-1,0,0; polytope p = Polymake::polytopeViaPoints(M); Polymake::visual(p); fan f = normalFan(p); Polymake::visual(f); @c example @end smallexample @end table