The smallest ball containing every point of points (the rows of the cloud, all of one length), for any number of points in any dimension. The Cech filtration value of a simplex is the radius of this ball over its vertices.
The smallest ball containing every point of points (the rows of the cloud, all of one length), for any number of points in any dimension. The Cech filtration value of a simplex is the radius of this ball over its vertices.
The ball is the unique one whose centre lies in the convex hull of the points on its boundary. It is found by an active-set method on the dual problem (maximise sum l_i |p_i|^2 - |sum l_i p_i|^2 over convex weights l, Wolfe's minimum-norm-point algorithm applied to the lifted points): keep a set of affinely independent points on the boundary with the centre in their hull, repeatedly add the point farthest from the centre, and drop points whose weight reaches zero. Each step solves a Gram system of at most d + 1 points, so the cost is polynomial in d and the number of points, also for the many boundary points of a high-dimensional cloud (a regular simplex in dimension 20 takes milliseconds).
Duplicate, collinear and cospherical points are handled: a point (numerically) in the affine hull of the current boundary set replaces a boundary point instead of joining them. The result is deterministic (no randomization, a fixed order of work), and the radius is exactly the largest distance from the returned centre to a point, so the ball always contains its points; it exceeds the true minimum radius by no more than the rounding of the computation (about 1e-13 relative) except on inputs so degenerate that the iteration stops early, where the ball is still a valid enclosing ball. Rescaling the points by a power of two rescales center and squaredRadius exactly.
Attributes
Throws
IllegalArgumentException
for an empty cloud, points of different lengths, or a non-finite coordinate