public class IndexedDoublePoint extends Object implements org.apache.commons.math3.ml.clustering.Clusterable, Serializable
Constructor and Description |
---|
IndexedDoublePoint(int sourceRow,
double[] point)
Build an instance wrapping a double array.
|
IndexedDoublePoint(int sourceRow,
int[] point)
Build an instance wrapping an integer array.
|
Modifier and Type | Method and Description |
---|---|
static double[] |
calculateCenter(List<IndexedDoublePoint> clusterPoints) |
boolean |
equals(Object other) |
double[] |
getPoint() |
int |
getSourceRow() |
int |
hashCode() |
String |
toString() |
public IndexedDoublePoint(int sourceRow, double[] point)
The wrapped array is referenced, it is not copied.
point
- the n-dimensional point in double spacepublic IndexedDoublePoint(int sourceRow, int[] point)
point
- the n-dimensional point in integer spacepublic static double[] calculateCenter(List<IndexedDoublePoint> clusterPoints)
public int getSourceRow()
public double[] getPoint()
getPoint
in interface org.apache.commons.math3.ml.clustering.Clusterable
Copyright © 2020–2025 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.