packEnclose<T> function Pack

PackCircle packEnclose<T>(
  1. Iterable<PackCircle> circles
)

Computes the smallest circle that encloses the specified iterable of circles, each of which must have a circle.r property specifying the circle’s radius, and circle.x and circle.y properties specifying the circle’s center.

The enclosing circle is computed using the Matoušek-Sharir-Welzl algorithm. (See also Apollonius’ Problem.)

Implementation

PackCircle packEnclose<T>(Iterable<PackCircle> circles) {
  return packEncloseRandom(circles, lcg());
}