|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PointSet
Abstraction to access the points and their Euclidean coordinates of a set of n points.
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
Method Summary | |
---|---|
double |
coord(int i,
int j)
The jth Euclidean coordinate of the ith point. |
int |
dimension()
The dimension of the ambient space of the points. |
int |
size()
Number of points. |
Method Detail |
---|
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |