EDPolytope: A Package to Compute the Euclidean Distance Degree of A Toric Variety

This page is supplementary material for the article Nearest Points on Toric Varieties by Martin Helmer and Bernd Sturmfels. It describes Version 2.2 of a Macaulay2 package to compute the Euclidean distance degree, polar degrees and Chern-Mather class of a projective toric variety. A download link and examples of use are given below. The package is implemented in Macaulay2 and the internal methods make use of the Polyhedra package. The package is called "EDPolytope.m2" and may be loaded with the command: needsPackage "EDPolytope".

Description

Let A be a d ⨯ n integer matrix of rank d which has the length n vector (1,1,1,...,1) in its row space and let XA be the (d-1)-dimensional toric variety in Pn-1 defined by the polytope Conv(A).

The EDPolytope package gives methods to compute:

Methods

Examples

To apply the EDPolytope package to Example 3.3 from Nearest Points on Toric Varieties we would enter the following:

needsPackage "EDPolytope";

A=transpose matrix{{1,0,1},{0,1,1},{1,1,1},{2,1,1},{3,1,1},{1,2,1}};

pds=PolarDegrees(A);

ed=EDdeg(A);

cm=CMClass(A);

We may compute the ED degree and polar degrees of the hypersimplex Δ4,2, which are given in the first row in Table 1 (on page 17) of Nearest Points on Toric Varieties, as follows:

needsPackage "EDPolytope";

A=hyperSimplexVertices(4,2);

PolarDegrees(A);

EDdeg(A);

cm=CMClass(A);

Alternatively we can have the program return a HashTable with all the computed invariants, either EDdeg, PolarDegrees, or CMClass may be used for this purpose and will return the same HashTable. In the hypersimplex example above this would be done as:

needsPackage "EDPolytope";

A=hyperSimplexVertices(4,2);

Invar=PolarDegrees(A,Output=>HashTable);

Invar=EDdeg(A,Output=>HashTable);

Invar#"ED"

Invar#"polar degrees"

Invar#"degree"

Invar#"dual degree"

Invar#"CM volumes"

Invar#"CM class"

Download

The package file "EDPolytope.m2" may be downloaded below:

The Article

Martin Helmer, Bernd Sturmfels. Nearest Points on Toric Varieties arXiv:1603.06544.