The Euclidean distance (ED) degree of a varieties arises from the following problem: given a (generic) data point, find the point on a given variety which minimizes the (possibly weighted) Euclidean distance function. The number of nonsingular critical points of the distance function is the ED degree of the variety.
This package provides several routines for determining the (generic or unit) Euclidean distance degree of an algebraic variety. These routines include symbolic methods and numerical methods for determining these degrees; they can be grouped into four main types:
As an example, this code computes the (unit) ED degree of a circle both symbolically and numerically
|
|
|
|
When the variety is an affine cone, one is able to compute ED degrees using ED degree homotopies, i.e., a structured parameter homotopy. The easiest case is when the variety is a hypersurface (or more generally, a complete intersection)
|
|
|
When a $V(F)$ is not a complete intersection we incorporate a membership test to filter out residual critical points. Here $V(F)$ is an irreducible component of $V(G)$ (a reducible variety) and `#G===codim ideal F`. These methods employ an equation by equation method called regeneration.
|
|
|
|
|
One may also determine ED degrees using a parameter homotopy called a Weight-ED Degree Homotopy. This code computes a unit ED degree:
|
|
|
|
|
|
This documentation describes version 1.1 of EuclideanDistanceDegree, released April 2026.
If you have used this package in your research, please cite it as follows:
|
The object EuclideanDistanceDegree is a package, defined in EuclideanDistanceDegree.m2, with auxiliary files in EuclideanDistanceDegree/.
The source of this document is in /build/reproducible-path/macaulay2-1.26.06+ds/M2/Macaulay2/packages/EuclideanDistanceDegree.m2:141:0.