|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.stat.clustering.EuclideanDoublePoint
public class EuclideanDoublePoint
A simple implementation of Clusterable
for points with double coordinates.
Field Summary | |
---|---|
private double[] |
point
Point coordinates. |
private static long |
serialVersionUID
Serializable version identifier. |
Constructor Summary | |
---|---|
EuclideanDoublePoint(double[] point)
Build an instance wrapping an integer array. |
Method Summary | |
---|---|
EuclideanDoublePoint |
centroidOf(java.util.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(java.lang.Object other)
|
double[] |
getPoint()
Get the n-dimensional point in integer space. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private final double[] point
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(java.util.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(java.lang.Object other)
equals
in class java.lang.Object
public double[] getPoint()
public int hashCode()
hashCode
in class java.lang.Object
public 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 |