public class EuclideanDoublePoint extends Object implements Clusterable<EuclideanDoublePoint>, Serializable
Clusterable for points with double coordinates.| Constructor and Description |
|---|
EuclideanDoublePoint(double[] pointIn)
Build an instance wrapping an integer array.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
public EuclideanDoublePoint(double[] pointIn)
The wrapped array is referenced, it is not copied.
pointIn - the n-dimensional point in integer spacepublic EuclideanDoublePoint centroidOf(Collection<EuclideanDoublePoint> points)
centroidOf in interface Clusterable<EuclideanDoublePoint>points - the Collection of points to compute the centroid ofpublic double distanceFrom(EuclideanDoublePoint p)
distanceFrom in interface Clusterable<EuclideanDoublePoint>p - the point to compute the distance frompublic double[] getPoint()
Copyright © 2025 CNES. All rights reserved.