|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.ArrayList<Point> ProGAL.geomNd.PointList
public class PointList
An ArrayList-wrapper for storing Nd points. Adds functionality specific to point-sets such as finding centroid, diameter or covariance.
Constructor Summary | |
---|---|
PointList(int dim)
Construct an empty point-list. |
|
PointList(Point[] elements)
Construc a point-list from an array of points. |
Method Summary | |
---|---|
boolean |
add(Point p)
|
PointList |
clone()
Get a shallow copy of this list. |
static java.util.List<Point> |
generatePointsInCube(int n,
int d)
|
Point |
getCentroid()
Get the centroid of the points. |
double |
getCoord(int k,
int i)
Returns the i'th coordinate of k'th point. |
Matrix |
getCovariance()
Get the covariance of the points. |
PointList |
getRandomPermutation()
Returns a new point-list containing all the elements in random order. |
double |
getStandardDeviation()
Get the standard deviation of the point set. |
PointList |
getSubList(int from,
int to)
Returns a sub-list of elements from (including) from to
(not including) to . |
double |
getVariance()
Get the variance of the points. |
void |
toConsole()
Writes this point-list to System.out . |
void |
toConsole(int dec)
Writes this point-list to System.out . |
Methods inherited from class java.util.ArrayList |
---|
add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public PointList(int dim)
public PointList(Point[] elements)
Method Detail |
---|
public boolean add(Point p)
add
in interface java.util.Collection<Point>
add
in interface java.util.List<Point>
add
in class java.util.ArrayList<Point>
public double getCoord(int k, int i)
public PointList getSubList(int from, int to)
from
to
(not including) to
. The returned sub-list is not a 'view'
of the sublist (such as AbstractList.subList), but a shallow copy of
the specified range.
public PointList getRandomPermutation()
public Point getCentroid()
public double getVariance()
public Matrix getCovariance()
public double getStandardDeviation()
public PointList clone()
clone
in class java.util.ArrayList<Point>
public void toConsole()
System.out
.
public void toConsole(int dec)
System.out
.
public static java.util.List<Point> generatePointsInCube(int n, int d)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |