|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.math3.stat.clustering.EuclideanDoublePoint
public class EuclideanDoublePoint
A simple implementation of Clusterable
for points with double coordinates.
Constructor Summary | |
---|---|
EuclideanDoublePoint(double[] point)
Build an instance wrapping an integer array. |
Method Summary | |
---|---|
EuclideanDoublePoint |
centroidOf(Collection<EuclideanDoublePoint> points)
Returns the centroid of the given Collection of points. |
double |
distanceFrom(EuclideanDoublePoint p)
Returns the distance from the given point. |
boolean |
equals(Object other)
|
double[] |
getPoint()
Get the n-dimensional point in integer space. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EuclideanDoublePoint(double[] point)
The wrapped array is referenced, it is not copied.
point
- the n-dimensional point in integer spaceMethod Detail |
---|
public EuclideanDoublePoint centroidOf(Collection<EuclideanDoublePoint> points)
centroidOf
in interface Clusterable<EuclideanDoublePoint>
points
- the Collection of points to compute the centroid of
public double distanceFrom(EuclideanDoublePoint p)
distanceFrom
in interface Clusterable<EuclideanDoublePoint>
p
- the point to compute the distance from
public boolean equals(Object other)
equals
in class Object
public double[] getPoint()
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |