Class DoublePoint
- java.lang.Object
-
- org.apache.commons.math4.legacy.ml.clustering.DoublePoint
-
- All Implemented Interfaces:
Clusterable
public class DoublePoint extends Object implements Clusterable
A simple implementation ofClusterablefor points with double coordinates.- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description DoublePoint(double[] point)Build an instance wrapping an double array.DoublePoint(int[] point)Build an instance wrapping an integer array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)double[]getPoint()Gets the n-dimensional point.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
DoublePoint
public DoublePoint(double[] point)
Build an instance wrapping an double array.The wrapped array is referenced, it is not copied.
- Parameters:
point- the n-dimensional point in double space
-
DoublePoint
public DoublePoint(int[] point)
Build an instance wrapping an integer array.The wrapped array is copied to an internal double array.
- Parameters:
point- the n-dimensional point in integer space
-
-
Method Detail
-
getPoint
public double[] getPoint()
Gets the n-dimensional point.- Specified by:
getPointin interfaceClusterable- Returns:
- the point array
-
-