Constructor and Description |
---|
ArrayPointSet(int d,
int n)
Creates an array-based point set to store n d-dimensional points.
|
Modifier and Type | Method and Description |
---|---|
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() |
public ArrayPointSet(int d, int n)
d
- the dimensions of the ambient spacen
- the number of pointspublic int size()
PointSet
public int dimension()
PointSet
Each point has dimension()
many Euclidean coordinates.
public double coord(int i, int j)
PointSet
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