# edDeg -- Computes the (generic) Euclidean distance degree of a projective toric variety

## Synopsis

• Usage:
edDeg(A)
• Inputs:
• A, , a full rank integer matrix with the vector (1,1,...,1) in its row space defining a projective toric variety XA
• Optional inputs:
• ForceAmat => , default value false, if A defines a codimension two toric variety a faster method will be used by default, setting this to true forces the general purpose method
• Output => a list, default value ZZ, this can be set to HashTable to return a HashTable with all computed values
• TextOutput => ... (missing documentation),
• Outputs:
• ED, an integer, the (generic) Euclidean distance degree of the projective toric variety XA.

## Description

This function computes (generic) Euclidean distance degree the projective toric variety XA, we do not assume that XA is normal. The default output is a list of polar degrees; other values of interest computed by the program are also output. To suppress text output use the option Output =>HashTable. This function uses polarDegrees internally.

 ```i1 : A=matrix{{0, 0, 0, 1, 1,5}, {7,0, 1, 3, 0, -2},{1,1, 1, 1, 1, 1}} o1 = | 0 0 0 1 1 5 | | 7 0 1 3 0 -2 | | 1 1 1 1 1 1 | 3 6 o1 : Matrix ZZ <--- ZZ``` ```i2 : edDeg(A) The toric variety has degree = 35 The dual variety has degree = 53, and codimension = 1 Chern-Mather Volumes: (V_0,..,V_(d-1)) = {-12, 20, 35} Polar Degrees: {53, 85, 35} ED Degree = 173 5 4 3 Chern-Mather Class: - 12h + 20h + 35h o2 = 173 o2 : QQ``` ```i3 : A=matrix{{3, 0, 0, 1, 1,2}, {3,5,0,2,1,3},{0, 1, 2, 0, 2,0},{1, 1, 1, 1, 1,1}} o3 = | 3 0 0 1 1 2 | | 3 5 0 2 1 3 | | 0 1 2 0 2 0 | | 1 1 1 1 1 1 | 4 6 o3 : Matrix ZZ <--- ZZ``` ```i4 : time edDeg(A) The toric variety has degree = 28 The dual variety has degree = 45, and codimension = 1 Chern-Mather Volumes: (V_0,..,V_(d-1)) = {20, 23, 31, 28} Polar Degrees: {45, 98, 81, 28} ED Degree = 252 5 4 3 2 Chern-Mather Class: 20h + 23h + 31h + 28h -- used 0.546615 seconds o4 = 252 o4 : QQ``` ```i5 : time edDeg(A,ForceAmat=>true) The toric variety has degree = 28 The dual variety has degree = 45, and codimension = 1 Chern-Mather Volumes: (V_0,..,V_(d-1)) = {20, 23, 31, 28} Polar Degrees: {45, 98, 81, 28} ED Degree = 252 5 4 3 2 Chern-Mather Class: 20h + 23h + 31h + 28h -- used 2.09942 seconds o5 = 252 o5 : QQ```

## Ways to use edDeg :

• edDeg(Matrix)