This is ConvexInterface.info, produced by Macaulay2, version 1.26.06

ConvexInterface -- Interface to the Maple package Convex.
*********************************************************

Description
===========

What's new:

July 13, 2010: Added a function mIsSubcone, testing whether a
cone is a subcone of another one.

October 4, 2009: Added a generic function callConvex, taking
a string with a program written in Convex syntax.

September 20, 2009: Added functions mPosHullFaces, and
mPosHullFacesAndDuals, to compute the face complex
of a cone. They have an Option (Macaulay2Doc), toFile,
to store the result of a computation in a file, and a function
readPosHullFaces, to read the file.

September 10, 2009: Added a function mLatticePoints, to
compute the lattice points of polytope.

August 28, 2009: The interface now uses indexed vertices. This substantially
improves computation time and memory usage.

August 25, 2009: Added an Option (Macaulay2Doc), toFile,
to mConvexHullFaces, and
mConvexHullFacesAndDuals, to store the result of a
computation in a file, and a function readConvexHullFaces,
to read the file.

Overview:

The goal of this package is to provide the functions of the Maple package
Convex in Macaulay 2.

The Convex package is distributed by Matthias Franz under the GNU General
Public License, see

http://www.math.uwo.ca/~mfranz/convex

for more information.

ConvexInterface is work in progress and so far accesses only a fraction of the
functionality provided by Convex. If you would like to help to expand this you
are welcome.

Note that there is a generic function callConvex, with takes
a String containing a program written in the Syntax of Maple/Convex.

Functions:

So far the following functions are accessible via ConvexInterface:

mConvexHullFaces,  -- compute the faces of a convex
hull

See mConvexHullFacesAndDuals, -- computing the
faces and their duals

See mHomology, -- Compute the homology of a (not necessarily
simplicial) complex

See mLatticePoints, -- computing the lattice points of a
convex hull

See mPosHullFaces,  -- compute the faces of a positive hull

See mPosHullFacesAndDuals, -- computing the faces and
their duals of a positive hull

Other functions that may be interesting to access:

dual, hilbertbasis, simplicialsubdiv, minkowskisum, newtonpolytope

and also

affinehull, ambientdim, arecompatible, boundary, codim, contains,
containsrelint, convhull, corank, corners, crosspolytope, cube, cyclicpolytope,
delaunay, dim, directsum, distance, domain, dotprod, draw, dual, edges,
emptypcomplex, emptypolyhedron, emptypolytope, facefan, faces, facets, fan,
flagf, flagh, fullcone, fullpolyhedron, furthestdelaunay, fvector,
genhpolynomial, genhvector, hilbertbasis, homology, hplanes, hspacenos,
hspaces, hvector, image, incidencematrix, incidentfacets, incidentrays,
intersection, isaffine, isbounded, iscomplete, iscontained, isempty, isface,
isfulldim, islinear, ispointed, ispolytopal, isquasipolytopal, isregular,
issimple, issimplex, issimplicial, issimplicial1, join, lensspace, lineality,
linearhull, lines, maximal, maximum, minimal, minimum, minkowskisum, modz,
newtonpolytope, normalfan, pcomplex, permutahedron, plotdata, polar, poshull,
posorthant, pred, preimage, projspace, proximum, randompolytope, rank, raynos,
rays, readpoly, recession, regularpart, regularsubdiv, relint,
simplicialsubdiv, skeleton, stdsimplex, stellarsubdiv, succ, support, surface,
torsion, transversalfan, traverse, traverse2, vertexnos, vertices, volume,
voronoi, wprojspace, writepoly, zerocone, zerofan

Setup:

This package needs the package MapleInterface, so
set this up first.

Install the convex package in Maple, i.e., put the file

http://www.math.uwo.ca/~mfranz/convex/files/current/convex.m

into the lib directory inside your Maple program directory. You can test it in
Maple by typing with(convex);

Install the ConvexInterface package in M2 by typing

installPackage("ConvexInterface")

Additional remarks:

You can put the convex.m file in any directory which shows up when you type in
Maple

libname;

You can change this global variable by editing the Maple init file.

You can also put the convex.m file in any directory you want, as long as you
tell M2 about the path. In this case the installation goes as follows: Do

installPackage("MapleInterface")

Edit the file init-ConvexInterface.m2 in the directory .Macaulay2 in your home
directory changing the line

"ConvexPath" =""

to

"ConvexPath" =StringWithPathToConvex

where StringWithPathToConvex is a string containing the path to the directory
containing the convex.m file.

In Unix type systems this will be something like

"/home/boehm/convex"

In Windows systems use double backslashes to separate directories and the
triple-slash as string delimiter. See the beginning of the source code for an
example.

To test whether the interface is set up properly do, e.g.,

callConvex("returnvalue:=convert(fvector(convhull([1,0],[0,1],[-1,0],[0,-1])),
list);")

which should return \{1,4,4,1\}.

Author
======

  * Janko Boehm (see http://www.math.uni-sb.de/ag/schreyer/jb/ )
    <boehm@mathematik.uni-kl.de>

Version
=======

This documentation describes version 0.33 of ConvexInterface, released December
1, 2010.

Citation
========

If you have used this package in your research, please cite it as follows:

+----------------------------------------------------------------------------+
|@misc{ConvexInterfaceSource,                                                |
|  title = {{ConvexInterface: interface to Convex. Version~0.33}},           |
|  author = {Janko Boehm},                                                   |
|  howpublished = {A \emph{Macaulay2} package available at                   |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}}|
|}                                                                           |
|                                                                            |
+----------------------------------------------------------------------------+

Exports
=======

  * Types
      * FinitelyGeneratedAbelianGroup, --
        Class of finitely generated abelian groups.
  * Functions and commands
      * callConvex -- Generic function to run a Convex
        program.
      * mConvexHullFaces -- Faces of a convex hull.
      * mConvexHullFacesAndDuals -- Faces and
        their duals of a convex hull.
      * mHomology -- Compute the homology.
      * mIsSubcone -- Test whether a cone is a subcone of
        another cone.
      * mLatticePoints -- Compute the lattice points of
        a convex hull.
      * mPosHullFaces -- Faces of a positive hull.
      * mPosHullFacesAndDuals -- Faces and their
        duals of positive hull.
      * readConvexHullFaces -- Read the result of a
        previous mConvexHullFaces or mConvexHullFacesAndDuals computation.
      * readPosHullFaces -- Read the result of a
        previous mPosHullFaces or mPosHullFacesAndDuals computation.
  * Methods
      * "callConvex(String)" -- see callConvex, -- Generic
        function to run a Convex program.
      * "net(FinitelyGeneratedAbelianGroup)" -- see
        FinitelyGeneratedAbelianGroup, -- Class
        of finitely generated abelian groups.
      * "mConvexHullFaces(List)" -- see mConvexHullFaces,
        -- Faces of a convex hull.
      * "mConvexHullFacesAndDuals(List)" -- see mConvexHullFacesAndDuals,
        -- Faces and their duals of a convex hull.
      * "mHomology(List)" -- see mHomology, -- Compute the
        homology.
      * "mIsSubcone(List,List)" -- see mIsSubcone, -- Test
        whether a cone is a subcone of another cone.
      * "mLatticePoints(List)" -- see mLatticePoints, --
        Compute the lattice points of a convex hull.
      * "mPosHullFaces(List)" -- see mPosHullFaces, --
        Faces of a positive hull.
      * "mPosHullFacesAndDuals(List)" -- see mPosHullFacesAndDuals,
        -- Faces and their duals of positive hull.
      * "readConvexHullFaces(String)" -- see readConvexHullFaces,
        -- Read the result of a previous mConvexHullFaces
        or mConvexHullFacesAndDuals computation.
      * "readPosHullFaces(String)" -- see readPosHullFaces,
        -- Read the result of a previous mPosHullFaces or
        mPosHullFacesAndDuals computation.
  * Symbols
      * toFile -- Store result in a file.

For the programmer
==================

The object ConvexInterface, is a package (Macaulay2Doc),
defined in ConvexInterface.m2, with auxiliary files in
ConvexInterface/.

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:483:0.

callConvex -- Generic function to run a Convex program.
*******************************************************

  * Usage:
        callConvex(S)
  * Inputs:
      * S, a string (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * toFile, => ..., default value null, Store result in a
        file.
  * Outputs:
      * a thing (Macaulay2Doc),

Description
===========

This is a generic function to run a Convex program given by the string S.

The result of the computation can be stored in a file via the Option (Macaulay2Doc),
see toFile.

+-----------------------------------------------------------------------------+
|i1 : callConvex("returnvalue:=convert(fvector(convhull([1,0],[0,1],[-1,0],[0 |
|                                                                             |
|o1 = {1, 4, 4, 1}                                                            |
|                                                                             |
|o1 : List                                                                    |
|-----------------------------------------------------------------------------|
|,-1])),list);")                                                              |
+-----------------------------------------------------------------------------+

Ways to use callConvex:
=======================

  * "callConvex(String)"

For the programmer
==================

The object callConvex, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:814:0.

FinitelyGeneratedAbelianGroup -- Class of finitely generated abelian groups.
****************************************************************************

Description
===========

The class of finitely generated abelian groups (finitely generated ZZ-modules).

This is used to store the result of mHomology, in a nice way.

+-----------------------------------------------------------------------------+
|i1 : C= {{{}}, {{{-1, -1, -1, -1, -1}}, {{1, 0, 0, 0, 0}}, {{0, 1, 0, 0, 0}},|
|                                                                             |
|o1 = {{{}}, {{{-1, -1, -1, -1, -1}}, {{1, 0, 0, 0, 0}}, {{0, 1, 0, 0, 0}},   |
|     ------------------------------------------------------------------------|
|     {{0, 0, 1, 0, 0}}, {{0, 0, 0, 1, 0}}, {{0, 0, 0, 0, 1}}}, {{{-1, -1, -1,|
|     ------------------------------------------------------------------------|
|     -1, -1}, {1, 0, 0, 0, 0}}, {{-1, -1, -1, -1, -1}, {0, 1, 0, 0, 0}}, {{1,|
|     ------------------------------------------------------------------------|
|     0, 0, 0, 0}, {0, 1, 0, 0, 0}}, {{-1, -1, -1, -1, -1}, {0, 0, 1, 0, 0}}, |
|     ------------------------------------------------------------------------|
|     {{1, 0, 0, 0, 0}, {0, 0, 1, 0, 0}}, {{0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}}, |
|     ------------------------------------------------------------------------|
|     {{-1, -1, -1, -1, -1}, {0, 0, 0, 1, 0}}, {{1, 0, 0, 0, 0}, {0, 0, 0, 1, |
|     ------------------------------------------------------------------------|
|     0}}, {{0, 1, 0, 0, 0}, {0, 0, 0, 1, 0}}, {{0, 0, 1, 0, 0}, {0, 0, 0, 1, |
|     ------------------------------------------------------------------------|
|     0}}, {{-1, -1, -1, -1, -1}, {0, 0, 0, 0, 1}}, {{1, 0, 0, 0, 0}, {0, 0,  |
|     ------------------------------------------------------------------------|
|     0, 0, 1}}, {{0, 1, 0, 0, 0}, {0, 0, 0, 0, 1}}, {{0, 0, 1, 0, 0}, {0, 0, |
|     ------------------------------------------------------------------------|
|     0, 0, 1}}, {{0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}}, {{{-1, -1, -1, -1, -1}, |
|     ------------------------------------------------------------------------|
|     {1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}}, {{1, 0, 0, 0, 0}, {0, 1, 0, 0, 0},   |
|     ------------------------------------------------------------------------|
|     {0, 0, 1, 0, 0}}, {{-1, -1, -1, -1, -1}, {1, 0, 0, 0, 0}, {0, 0, 0, 1,  |
|     ------------------------------------------------------------------------|
|     0}}, {{-1, -1, -1, -1, -1}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}}, {{0, 1,  |
|     ------------------------------------------------------------------------|
|     0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}}, {{-1, -1, -1, -1, -1}, {0, |
|     ------------------------------------------------------------------------|
|     1, 0, 0, 0}, {0, 0, 0, 0, 1}}, {{-1, -1, -1, -1, -1}, {0, 0, 1, 0, 0},  |
|     ------------------------------------------------------------------------|
|     {0, 0, 0, 0, 1}}, {{1, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 0, 1}},  |
|     ------------------------------------------------------------------------|
|     {{1, 0, 0, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}, {{0, 1, 0, 0, 0},  |
|     ------------------------------------------------------------------------|
|     {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}}, {}, {}, {}}                         |
|                                                                             |
|o1 : List                                                                    |
|-----------------------------------------------------------------------------|
|{{0, 0, 1, 0, 0}}, {{0, 0, 0, 1, 0}}, {{0, 0, 0, 0, 1}}}, {{{-1, -1, -1,     |
|-----------------------------------------------------------------------------|
|-1,-1}, {1, 0, 0, 0, 0}}, {{-1, -1, -1, -1, -1}, {0, 1, 0, 0, 0}}, {{1, 0, 0,|
|-----------------------------------------------------------------------------|
|0, 0}, {0, 1, 0, 0, 0}}, {{-1, -1, -1, -1, -1}, {0, 0, 1, 0, 0}}, {{1, 0, 0, |
|-----------------------------------------------------------------------------|
|0, 0}, {0, 0, 1, 0, 0}}, {{0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}}, {{-1, -1, -1,   |
|-----------------------------------------------------------------------------|
|-1, -1}, {0, 0, 0, 1, 0}}, {{1, 0, 0, 0, 0}, {0, 0, 0, 1, 0}}, {{0, 1, 0, 0, |
|-----------------------------------------------------------------------------|
|0}, {0, 0, 0, 1, 0}}, {{0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}}, {{-1, -1, -1, -1,  |
|-----------------------------------------------------------------------------|
|-1}, {0, 0, 0, 0, 1}}, {{1, 0, 0, 0, 0}, {0, 0, 0, 0, 1}}, {{0, 1, 0, 0, 0}, |
|-----------------------------------------------------------------------------|
|{0, 0, 0, 0, 1}}, {{0, 0, 1, 0, 0}, {0, 0, 0, 0, 1}}, {{0, 0, 0, 1, 0}, {0,  |
|-----------------------------------------------------------------------------|
|0, 0, 0, 1}}}, {{{-1, -1, -1, -1, -1}, {1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}},    |
|-----------------------------------------------------------------------------|
|{{1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}}, {{-1, -1, -1, -1, -1},  |
|-----------------------------------------------------------------------------|
|{1, 0, 0, 0, 0}, {0, 0, 0, 1, 0}}, {{-1, -1, -1, -1, -1}, {0, 0, 1, 0, 0},   |
|-----------------------------------------------------------------------------|
|{0, 0, 0, 1, 0}}, {{0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}}, {{-1, |
|-----------------------------------------------------------------------------|
|-1, -1, -1, -1}, {0, 1, 0, 0, 0}, {0, 0, 0, 0, 1}}, {{-1, -1, -1, -1, -1},   |
|-----------------------------------------------------------------------------|
|{0, 0, 1, 0, 0}, {0, 0, 0, 0, 1}}, {{1, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, |
|-----------------------------------------------------------------------------|
|0, 0, 1}}, {{1, 0, 0, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}, {{0, 1, 0, 0,|
|-----------------------------------------------------------------------------|
|0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}}, {}, {}, {}}                          |
+-----------------------------------------------------------------------------+
|i2 : H=mHomology(C)                                                          |
|                                                                             |
|o2 = {ZZ, ZZ/2, 0, 0, 0, 0}                                                  |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : H#0                                                                     |
|                                                                             |
|o3 = ZZ                                                                      |
|                                                                             |
|o3 : finitely generated abelian group                                        |
+-----------------------------------------------------------------------------+
|i4 : H#1                                                                     |
|                                                                             |
|o4 = ZZ/2                                                                    |
|                                                                             |
|o4 : finitely generated abelian group                                        |
+-----------------------------------------------------------------------------+

Methods that use a finitely generated abelian group:
====================================================

  * "net(FinitelyGeneratedAbelianGroup)"

For the programmer
==================

The object FinitelyGeneratedAbelianGroup,
is a type (Macaulay2Doc), with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:709:0.

mConvexHullFaces -- Faces of a convex hull.
*******************************************

  * Usage:
        mConvexHullFaces(L)
  * Inputs:
      * L, a list (Macaulay2Doc), of Vector (Macaulay2Doc),
        s
  * Optional inputs (Macaulay2Doc),:
      * toFile, => ..., default value null, Store result in a
        file.
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Returns a list of

- a Matrix (Macaulay2Doc), A with the vertices of the convex hull
of L in its rows

- a list of lists with the faces of the convex hull sorted by increasing
dimension.

The vertices of the faces are represented by the indices of the rows of A.

This uses the Convex functions convHull and faces.

+-----------------------------------------------------------------------------+
|i1 : L={vector {1,0,0},vector {-1,0,0},vector {0,1,0},vector {0,-1,0},vector |
|                                                                             |
|o1 = {| 1 |, | -1 |, | 0 |, | 0  |, | 0 |, | 0  |}                           |
|      | 0 |  | 0  |  | 1 |  | -1 |  | 0 |  | 0  |                            |
|      | 0 |  | 0  |  | 0 |  | 0  |  | 1 |  | -1 |                            |
|                                                                             |
|o1 : List                                                                    |
|-----------------------------------------------------------------------------|
|{0,0,1},vector {0,0,-1}}                                                     |
+-----------------------------------------------------------------------------+
|i2 : P=mConvexHullFaces(L)                                                   |
|                                                                             |
|o2 = {| 1  0  0  |, {{{}}, {{1}, {2}, {3}, {4}, {5}, {6}}, {{3, 5}, {2, 5},  |
|      | -1 0  0  |                                                           |
|      | 0  1  0  |                                                           |
|      | 0  -1 0  |                                                           |
|      | 0  0  1  |                                                           |
|      | 0  0  -1 |                                                           |
|     ------------------------------------------------------------------------|
|     {2, 3}, {1, 5}, {1, 3}, {4, 5}, {2, 4}, {1, 4}, {3, 6}, {2, 6}, {1, 6}, |
|     ------------------------------------------------------------------------|
|     {4, 6}}, {{2, 3, 5}, {1, 3, 5}, {2, 4, 5}, {1, 4, 5}, {2, 3, 6}, {1, 3, |
|     ------------------------------------------------------------------------|
|     6}, {2, 4, 6}, {1, 4, 6}}, {{1, 2, 3, 4, 5, 6}}}}                       |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use mConvexHullFaces:
=============================

  * "mConvexHullFaces(List)"

For the programmer
==================

The object mConvexHullFaces, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:515:0.

mConvexHullFacesAndDuals -- Faces and their duals of a convex hull.
*******************************************************************

  * Usage:
        mConvexHullFacesAndDuals(L)
  * Inputs:
      * L, a list (Macaulay2Doc), of Vector (Macaulay2Doc),
        s
  * Optional inputs (Macaulay2Doc),:
      * toFile, => ..., default value null, Store result in a
        file.
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Returns a list of

- a Matrix (Macaulay2Doc), A with the vertices of the convex hull
of L in its rows

- a Matrix (Macaulay2Doc), Adual with the vertices of the dual in
its rows

- a list of lists with the faces of the convex hull sorted by increasing
dimension.

Each face is a list with two elements. The first is a list of the vertices of
the face, the second a list of the vertices of the dual face.

The vertices of the faces are represented by the indices of the rows of A.

This requires that the convex hull of L contains 0 in its interior.

This uses the Convex functions convHull and faces.

+-----------------------------------------------------------------------------+
|i1 : L={vector {1,0,0},vector {-1,0,0},vector {0,1,0},vector {0,-1,0},vector |
|                                                                             |
|o1 = {| 1 |, | -1 |, | 0 |, | 0  |, | 0 |, | 0  |}                           |
|      | 0 |  | 0  |  | 1 |  | -1 |  | 0 |  | 0  |                            |
|      | 0 |  | 0  |  | 0 |  | 0  |  | 1 |  | -1 |                            |
|                                                                             |
|o1 : List                                                                    |
|-----------------------------------------------------------------------------|
|{0,0,1},vector {0,0,-1}}                                                     |
+-----------------------------------------------------------------------------+
|i2 : P=mConvexHullFacesAndDuals(L)                                           |
|                                                                             |
|o2 = {| 1  0  0  |, | 1  -1 -1 |, {{{{}, {1, 2, 3, 4, 5, 6, 7, 8}}}, {{{1},  |
|      | -1 0  0  |  | -1 -1 -1 |                                             |
|      | 0  1  0  |  | 1  1  -1 |                                             |
|      | 0  -1 0  |  | -1 1  -1 |                                             |
|      | 0  0  1  |  | 1  -1 1  |                                             |
|      | 0  0  -1 |  | -1 -1 1  |                                             |
|                    | 1  1  1  |                                             |
|                    | -1 1  1  |                                             |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 8}}, {{2}, {1, 3, 5, 7}}, {{3}, {1, 2, 5, 6}}, {{4}, {3, 4, 7,|
|     ------------------------------------------------------------------------|
|     8}}, {{5}, {1, 2, 3, 4}}, {{6}, {5, 6, 7, 8}}}, {{{3, 5}, {1, 2}}, {{2, |
|     ------------------------------------------------------------------------|
|     5}, {1, 3}}, {{2, 3}, {1, 5}}, {{1, 5}, {2, 4}}, {{1, 3}, {2, 6}}, {{4, |
|     ------------------------------------------------------------------------|
|     5}, {3, 4}}, {{2, 4}, {3, 7}}, {{1, 4}, {4, 8}}, {{3, 6}, {5, 6}}, {{2, |
|     ------------------------------------------------------------------------|
|     6}, {5, 7}}, {{1, 6}, {6, 8}}, {{4, 6}, {7, 8}}}, {{{2, 3, 5}, {1}},    |
|     ------------------------------------------------------------------------|
|     {{1, 3, 5}, {2}}, {{2, 4, 5}, {3}}, {{1, 4, 5}, {4}}, {{2, 3, 6}, {5}}, |
|     ------------------------------------------------------------------------|
|     {{1, 3, 6}, {6}}, {{2, 4, 6}, {7}}, {{1, 4, 6}, {8}}}, {{{1, 2, 3, 4, 5,|
|     ------------------------------------------------------------------------|
|     6}, {}}}}}                                                              |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use mConvexHullFacesAndDuals:
=====================================

  * "mConvexHullFacesAndDuals(List)"

For the programmer
==================

The object mConvexHullFacesAndDuals, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:553:0.

mHomology -- Compute the homology.
**********************************

  * Usage:
        mHomology(C)
  * Inputs:
      * C, a list (Macaulay2Doc), of lists with the faces of a
        complex, sorted by dimension, each face represented by a list of
        vertices.
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Returns a list of FinitelyGeneratedAbelianGroup,
s with the homology with closed support of C with
integer coefficients.

C does not have to be simplicial.

This uses the Convex functions convHull, simplicialsubdiv, pcomplex and
homology.

Remark: One should also implement the relative version from Convex.

+-----------------------------------------------------------------------------+
|i1 : C={{{}}, {{{-1, -1, -1, -1}}, {{1, 0, 0, 0}}, {{0, 1, 0, 0}}, {{0, 0,   |
|-----------------------------------------------------------------------------|
|1,0}}, {{0, 0, 0, 1}}}, {{{-1, -1, -1, -1}, {0, 1, 0, 0}}, {{-1, -1, -1,-1}, |
|-----------------------------------------------------------------------------|
|{0, 0, 1, 0}}, {{1, 0, 0, 0}, {0, 0, 1, 0}}, {{1, 0, 0, 0}, {0, 0, 0,1}},    |
|-----------------------------------------------------------------------------|
|{{0, 1, 0, 0}, {0, 0, 0, 1}}}, {}, {}, {}};                                  |
+-----------------------------------------------------------------------------+
|i2 : mHomology(C)                                                            |
|                                                                             |
|o2 = {}                                                                      |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

RP2:

+-----------------------------------------------------------------------------+
|i3 : C= {{{}}, {{{-1, -1, -1, -1, -1}}, {{1, 0, 0, 0, 0}}, {{0, 1, 0, 0, 0}},|
|-----------------------------------------------------------------------------|
|{{0, 0, 1, 0, 0}}, {{0, 0, 0, 1, 0}}, {{0, 0, 0, 0, 1}}}, {{{-1, -1, -1,     |
|-----------------------------------------------------------------------------|
|-1,-1}, {1, 0, 0, 0, 0}}, {{-1, -1, -1, -1, -1}, {0, 1, 0, 0, 0}}, {{1, 0, 0,|
|-----------------------------------------------------------------------------|
|0, 0}, {0, 1, 0, 0, 0}}, {{-1, -1, -1, -1, -1}, {0, 0, 1, 0, 0}}, {{1, 0, 0, |
|-----------------------------------------------------------------------------|
|0, 0}, {0, 0, 1, 0, 0}}, {{0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}}, {{-1, -1, -1,   |
|-----------------------------------------------------------------------------|
|-1, -1}, {0, 0, 0, 1, 0}}, {{1, 0, 0, 0, 0}, {0, 0, 0, 1, 0}}, {{0, 1, 0, 0, |
|-----------------------------------------------------------------------------|
|0}, {0, 0, 0, 1, 0}}, {{0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}}, {{-1, -1, -1, -1,  |
|-----------------------------------------------------------------------------|
|-1}, {0, 0, 0, 0, 1}}, {{1, 0, 0, 0, 0}, {0, 0, 0, 0, 1}}, {{0, 1, 0, 0, 0}, |
|-----------------------------------------------------------------------------|
|{0, 0, 0, 0, 1}}, {{0, 0, 1, 0, 0}, {0, 0, 0, 0, 1}}, {{0, 0, 0, 1, 0}, {0,  |
|-----------------------------------------------------------------------------|
|0, 0, 0, 1}}}, {{{-1, -1, -1, -1, -1}, {1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}},    |
|-----------------------------------------------------------------------------|
|{{1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}}, {{-1, -1, -1, -1, -1},  |
|-----------------------------------------------------------------------------|
|{1, 0, 0, 0, 0}, {0, 0, 0, 1, 0}}, {{-1, -1, -1, -1, -1}, {0, 0, 1, 0, 0},   |
|-----------------------------------------------------------------------------|
|{0, 0, 0, 1, 0}}, {{0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}}, {{-1, |
|-----------------------------------------------------------------------------|
|-1, -1, -1, -1}, {0, 1, 0, 0, 0}, {0, 0, 0, 0, 1}}, {{-1, -1, -1, -1, -1},   |
|-----------------------------------------------------------------------------|
|{0, 0, 1, 0, 0}, {0, 0, 0, 0, 1}}, {{1, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, |
|-----------------------------------------------------------------------------|
|0, 0, 1}}, {{1, 0, 0, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}, {{0, 1, 0, 0,|
|-----------------------------------------------------------------------------|
|0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}}, {}, {}, {}};                         |
+-----------------------------------------------------------------------------+
|i4 : mHomology(C)                                                            |
|                                                                             |
|o4 = {}                                                                      |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use mHomology:
======================

  * "mHomology(List)"

For the programmer
==================

The object mHomology, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:665:0.

mIsSubcone -- Test whether a cone is a subcone of another cone.
***************************************************************

  * Usage:
        mIsSubcone(L1,L2)
  * Inputs:
      * L1, a list (Macaulay2Doc), of vectors generating the cone
        C1
      * L2, a list (Macaulay2Doc), of vectors generating the cone
        C2
  * Optional inputs (Macaulay2Doc),:
      * toFile, => ..., default value null, Store result in a
        file.
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

Test whether C1 is a subcone of C2.

+------------------------+
|i1 : L1={{1,0},{0,1}};  |
+------------------------+
|i2 : L1=apply(L1,vector)|
|                        |
|o2 = {| 1 |, | 0 |}     |
|      | 0 |  | 1 |      |
|                        |
|o2 : List               |
+------------------------+
|i3 : L2={{1,2},{2,1}};  |
+------------------------+
|i4 : L2=apply(L2,vector)|
|                        |
|o4 = {| 1 |, | 2 |}     |
|      | 2 |  | 1 |      |
|                        |
|o4 : List               |
+------------------------+
|i5 : mIsSubcone(L1,L2)  |
|                        |
|o5 = false              |
+------------------------+
|i6 : mIsSubcone(L2,L1)  |
|                        |
|o6 = true               |
+------------------------+

Ways to use mIsSubcone:
=======================

  * "mIsSubcone(List,List)"

For the programmer
==================

The object mIsSubcone, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:737:0.

mLatticePoints -- Compute the lattice points of a convex hull.
**************************************************************

  * Usage:
        mLatticePoints(L)
  * Inputs:
      * L, a list (Macaulay2Doc), of Vector (Macaulay2Doc),
        s.
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Returns a list with the lattice points of the convex hull of L.

This uses the Convex functions convHull and hilbertbasis.

+-----------------------------------------------------------------------------+
|i1 : L={vector {3,-1,-1},vector {-1,3,-1},vector {-1,-1,3},vector            |
|-----------------------------------------------------------------------------|
|{-1,-1,-1}};                                                                 |
+-----------------------------------------------------------------------------+
|i2 : P=mLatticePoints(L)                                                     |
|                                                                             |
|o2 = {}                                                                      |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use mLatticePoints:
===========================

  * "mLatticePoints(List)"

For the programmer
==================

The object mLatticePoints, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:689:0.

mPosHullFaces -- Faces of a positive hull.
******************************************

  * Usage:
        mPosHullFaces(L)
  * Inputs:
      * L, a list (Macaulay2Doc), of Vector (Macaulay2Doc),
        s
  * Optional inputs (Macaulay2Doc),:
      * toFile, => ..., default value null, Store result in a
        file.
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Returns a list of

- a Matrix (Macaulay2Doc), A with the rays of the positive hull of
L in its rows

- a list of lists with the faces of the convex hull sorted by increasing
dimension.

The rays of the faces are represented by the indices of the rows of A.

This uses the Convex functions posHull and faces.

The positive hull of L is required to be strictly convex.

+-----------------------------------------------------------------------------+
|i1 : L= {{0,1,1,0,0},{0,1,0,1,0},{0,1,0,0,0},{1,0,0,0,1},{1,0,-1,-1,-1},{1,0,|
|-----------------------------------------------------------------------------|
|0,0,0}};                                                                     |
+-----------------------------------------------------------------------------+
|i2 : L=apply(L,vector)                                                       |
|                                                                             |
|o2 = {| 0 |, | 0 |, | 0 |, | 1 |, | 1  |, | 1 |}                             |
|      | 1 |  | 1 |  | 1 |  | 0 |  | 0  |  | 0 |                              |
|      | 1 |  | 0 |  | 0 |  | 0 |  | -1 |  | 0 |                              |
|      | 0 |  | 1 |  | 0 |  | 0 |  | -1 |  | 0 |                              |
|      | 0 |  | 0 |  | 0 |  | 1 |  | -1 |  | 0 |                              |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : P=mPosHullFaces(L)                                                      |
|                                                                             |
|o3 = {| 0 1 1  0  0  |, {{{}}, {{1}, {2}, {3}, {4}, {5}, {6}}, {{3, 5}, {3,  |
|      | 0 1 0  1  0  |                                                       |
|      | 0 1 0  0  0  |                                                       |
|      | 1 0 0  0  1  |                                                       |
|      | 1 0 -1 -1 -1 |                                                       |
|      | 1 0 0  0  0  |                                                       |
|     ------------------------------------------------------------------------|
|     4}, {2, 3}, {1, 3}, {5, 6}, {4, 6}, {2, 6}, {1, 6}, {4, 5}, {2, 5}, {2, |
|     ------------------------------------------------------------------------|
|     4}, {1, 5}, {1, 4}, {1, 2}}, {{3, 4, 5}, {2, 3, 5}, {2, 3, 4}, {2, 4,   |
|     ------------------------------------------------------------------------|
|     5}, {1, 3, 5}, {1, 3, 4}, {1, 4, 5}, {1, 2, 3}, {1, 2, 5}, {1, 2, 4},   |
|     ------------------------------------------------------------------------|
|     {4, 5, 6}, {2, 5, 6}, {2, 4, 6}, {1, 5, 6}, {1, 4, 6}, {1, 2, 6}}, {{2, |
|     ------------------------------------------------------------------------|
|     3, 4, 5}, {1, 3, 4, 5}, {1, 2, 3, 5}, {1, 2, 3, 4}, {2, 4, 5, 6}, {1, 4,|
|     ------------------------------------------------------------------------|
|     5, 6}, {1, 2, 5, 6}, {1, 2, 4, 6}}, {{1, 2, 3, 4, 5, 6}}}}              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use mPosHullFaces:
==========================

  * "mPosHullFaces(List)"

For the programmer
==================

The object mPosHullFaces, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:589:0.

mPosHullFacesAndDuals -- Faces and their duals of positive hull.
****************************************************************

  * Usage:
        mPosHullFacesAndDuals(L)
  * Inputs:
      * L, a list (Macaulay2Doc), of Vector (Macaulay2Doc),
        s
  * Optional inputs (Macaulay2Doc),:
      * toFile, => ..., default value null, Store result in a
        file.
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Returns a list of

- a Matrix (Macaulay2Doc), A with the rays of the positive hull of
L in its rows

- a Matrix (Macaulay2Doc), Adual with the rays of the dual in its
rows

- a list of lists with the faces of the positive hull sorted by increasing
dimension.

Each face is a list with two elements. The first is a list of the vertices of
the face, the second a list of the vertices of the dual face.

The rays of the faces are represented by the indices of the rows of A.

This uses the Convex functions posHull and faces.

The positive hull of L is required to be strictly convex and of full dimension.

+-----------------------------------------------------------------------------+
|i1 : L= {{0,1,1,0,0},{0,1,0,1,0},{0,1,0,0,0},{1,0,0,0,1},{1,0,-1,-1,-1},{1,0,|
|-----------------------------------------------------------------------------|
|0,0,0}};                                                                     |
+-----------------------------------------------------------------------------+
|i2 : L=apply(L,vector)                                                       |
|                                                                             |
|o2 = {| 0 |, | 0 |, | 0 |, | 1 |, | 1  |, | 1 |}                             |
|      | 1 |  | 1 |  | 1 |  | 0 |  | 0  |  | 0 |                              |
|      | 1 |  | 0 |  | 0 |  | 0 |  | -1 |  | 0 |                              |
|      | 0 |  | 1 |  | 0 |  | 0 |  | -1 |  | 0 |                              |
|      | 0 |  | 0 |  | 0 |  | 1 |  | -1 |  | 0 |                              |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : P=mPosHullFacesAndDuals(L)                                              |
|                                                                             |
|o3 = {| 0 1 1  0  0  |, | 1 0 2  0  -1 |, {{{{}, {1, 2, 3, 4, 5, 6, 7, 8}}}, |
|      | 0 1 0  1  0  |  | 1 0 0  2  -1 |                                     |
|      | 0 1 0  0  0  |  | 1 0 0  0  1  |                                     |
|      | 1 0 0  0  1  |  | 1 0 0  0  -1 |                                     |
|      | 1 0 -1 -1 -1 |  | 0 1 1  -1 0  |                                     |
|      | 1 0 0  0  0  |  | 0 1 -1 1  0  |                                     |
|                        | 0 1 -1 -1 2  |                                     |
|                        | 0 1 -1 -1 0  |                                     |
|     ------------------------------------------------------------------------|
|     {{{1}, {2, 3, 4, 6, 7, 8}}, {{2}, {1, 3, 4, 5, 7, 8}}, {{3}, {1, 2, 3,  |
|     ------------------------------------------------------------------------|
|     4}}, {{4}, {1, 2, 4, 5, 6, 8}}, {{5}, {1, 2, 3, 5, 6, 7}}, {{6}, {5, 6, |
|     ------------------------------------------------------------------------|
|     7, 8}}}, {{{3, 5}, {1, 2, 3}}, {{3, 4}, {1, 2, 4}}, {{2, 3}, {1, 3, 4}},|
|     ------------------------------------------------------------------------|
|     {{1, 3}, {2, 3, 4}}, {{5, 6}, {5, 6, 7}}, {{4, 6}, {5, 6, 8}}, {{2, 6}, |
|     ------------------------------------------------------------------------|
|     {5, 7, 8}}, {{1, 6}, {6, 7, 8}}, {{4, 5}, {1, 2, 5, 6}}, {{2, 5}, {1, 3,|
|     ------------------------------------------------------------------------|
|     5, 7}}, {{2, 4}, {1, 4, 5, 8}}, {{1, 5}, {2, 3, 6, 7}}, {{1, 4}, {2, 4, |
|     ------------------------------------------------------------------------|
|     6, 8}}, {{1, 2}, {3, 4, 7, 8}}}, {{{3, 4, 5}, {1, 2}}, {{2, 3, 5}, {1,  |
|     ------------------------------------------------------------------------|
|     3}}, {{2, 3, 4}, {1, 4}}, {{2, 4, 5}, {1, 5}}, {{1, 3, 5}, {2, 3}}, {{1,|
|     ------------------------------------------------------------------------|
|     3, 4}, {2, 4}}, {{1, 4, 5}, {2, 6}}, {{1, 2, 3}, {3, 4}}, {{1, 2, 5},   |
|     ------------------------------------------------------------------------|
|     {3, 7}}, {{1, 2, 4}, {4, 8}}, {{4, 5, 6}, {5, 6}}, {{2, 5, 6}, {5, 7}}, |
|     ------------------------------------------------------------------------|
|     {{2, 4, 6}, {5, 8}}, {{1, 5, 6}, {6, 7}}, {{1, 4, 6}, {6, 8}}, {{1, 2,  |
|     ------------------------------------------------------------------------|
|     6}, {7, 8}}}, {{{2, 3, 4, 5}, {1}}, {{1, 3, 4, 5}, {2}}, {{1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {3}}, {{1, 2, 3, 4}, {4}}, {{2, 4, 5, 6}, {5}}, {{1, 4, 5, 6}, {6}},    |
|     ------------------------------------------------------------------------|
|     {{1, 2, 5, 6}, {7}}, {{1, 2, 4, 6}, {8}}}, {{{1, 2, 3, 4, 5, 6}, {}}}}} |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use mPosHullFacesAndDuals:
==================================

  * "mPosHullFacesAndDuals(List)"

For the programmer
==================

The object mPosHullFacesAndDuals, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:628:0.

readConvexHullFaces -- Read the result of a previous mConvexHullFaces or mConvexHullFacesAndDuals computation.
**************************************************************************************************************

  * Usage:
        readConvexHullFaces(fn)
  * Inputs:
      * fn, a string (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Read from the file fn the result of a previous mConvexHullFaces,
or mConvexHullFacesAndDuals,
computation stored via the Option (Macaulay2Doc), toFile.

Ways to use readConvexHullFaces:
================================

  * "readConvexHullFaces(String)"

For the programmer
==================

The object readConvexHullFaces, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:775:0.

readPosHullFaces -- Read the result of a previous mPosHullFaces or mPosHullFacesAndDuals computation.
*****************************************************************************************************

  * Usage:
        readPosHullFaces(fn)
  * Inputs:
      * fn, a string (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Read from the file fn the result of a previous mPosHullFacesAndDuals,
or mPosHullFaces, computation
stored via the Option (Macaulay2Doc), toFile.

Ways to use readPosHullFaces:
=============================

  * "readPosHullFaces(String)"

For the programmer
==================

The object readPosHullFaces, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:792:0.

toFile -- Store result in a file.
*********************************

Description
===========

If the option toFile=>fn with a String (Macaulay2Doc), fn is given
then mConvexHullFacesAndDuals,  stores the
result in a file named fn.

This data can be read by the commands readConvexHullFaces,
and readPosHullFaces.

Functions with optional argument named toFile:
==============================================

  * "callConvex(...,toFile=>...)"
  * "mConvexHullFaces(...,toFile=>...)"
  * "mConvexHullFacesAndDuals(...,toFile=>...)"
  * "mIsSubcone(...,toFile=>...)"
  * "mPosHullFaces(...,toFile=>...)"
  * "mPosHullFacesAndDuals(...,toFile=>...)"

For the programmer
==================

The object toFile, is a symbol (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in ConvexInterface.m2:757:0.