public interface PointSet
Classes like Miniball
do not take their input point set as a Java List
are
similar data structure, as this forces the user to provide the points in a certain format.
Instead, the algorithms require an PointSet
that allows the necessary characteristics of
the points to be queried.
Notice that most algorithms that use PointSet
s will assume that the underlying point set
is immutable.
For optimal performance, you may want to copy your points to a Java array and use a
ArrayPointSet
.
ArrayPointSet
int size()
int dimension()
Each point has dimension()
many Euclidean coordinates.
double coord(int i, int j)
i
- the number of the point, 0 ≤ i < size()
j
- the dimension of the coordinate of interest, 0 ≤ j ≤ dimension()