|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dreizak.miniball.model.ArrayPointSet
public final class ArrayPointSet
A PointSet
that stores n d-dimensional points in a Java array of
double
s.
Constructor Summary | |
---|---|
ArrayPointSet(int d,
int n)
Creates an array-based point set to store n d-dimensional points. |
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. |
void |
set(int i,
int j,
double v)
Sets the jth Euclidean coordinate of the ith point to the given value. |
int |
size()
Number of points. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArrayPointSet(int d, int n)
d
- the dimensions of the ambient spacen
- the number of pointsMethod Detail |
---|
public int size()
PointSet
size
in interface PointSet
public int dimension()
PointSet
Each point has dimension()
many Euclidean coordinates.
dimension
in interface PointSet
public double coord(int i, int j)
PointSet
coord
in interface PointSet
i
- the number of the point, 0 ≤ i < size()
j
- the dimension of the coordinate of interest, 0 ≤ j ≤ dimension()
public void set(int i, int j, double v)
i
- the number of the point, 0 ≤ i < size()
j
- the dimension of the coordinate of interest, 0 ≤ j ≤ dimension()
v
- the value to set as the jth Euclidean coordinate of the ith pointpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |