com.dreizak.miniball.model
Interface PointSet

All Known Implementing Classes:
ArrayPointSet

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 PointSets 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.

See Also:
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

size

int size()
Number of points.

Returns:
the number of points in the point set.

dimension

int dimension()
The dimension of the ambient space of the points.

Each point has dimension() many Euclidean coordinates.

Returns:
the dimension of the ambient space

coord

double coord(int i,
             int j)
The jth Euclidean coordinate of the ith point.

Parameters:
i - the number of the point, 0 ≤ i < size()
j - the dimension of the coordinate of interest, 0 ≤ j ≤ dimension()
Returns:
the jth Euclidean coordinate of the ith point


Copyright © 2013. All Rights Reserved.