|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.stat.clustering.EuclideanIntegerPoint
public class EuclideanIntegerPoint
A simple implementation of Clusterable
for points with integer coordinates.
Constructor Summary | |
---|---|
EuclideanIntegerPoint(int[] point)
Build an instance wrapping an integer array. |
Method Summary | |
---|---|
EuclideanIntegerPoint |
centroidOf(Collection<EuclideanIntegerPoint> points)
Returns the centroid of the given Collection of points. |
double |
distanceFrom(EuclideanIntegerPoint p)
Returns the distance from the given point. |
boolean |
equals(Object other)
|
int[] |
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 EuclideanIntegerPoint(int[] point)
The wrapped array is referenced, it is not copied.
point
- the n-dimensional point in integer spaceMethod Detail |
---|
public int[] getPoint()
public double distanceFrom(EuclideanIntegerPoint p)
distanceFrom
in interface Clusterable<EuclideanIntegerPoint>
p
- the point to compute the distance from
public EuclideanIntegerPoint centroidOf(Collection<EuclideanIntegerPoint> points)
centroidOf
in interface Clusterable<EuclideanIntegerPoint>
points
- the Collection of points to compute the centroid of
public boolean equals(Object other)
equals
in class Object
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 |