public class DoublePoint extends Object implements Clusterable, Serializable
Clusterable
for points with double coordinates.Constructor and Description |
---|
DoublePoint(double[] point)
Build an instance wrapping an double array.
|
DoublePoint(int[] point)
Build an instance wrapping an integer array.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
double[] |
getPoint()
Gets the n-dimensional point.
|
int |
hashCode() |
String |
toString() |
public DoublePoint(double[] point)
The wrapped array is referenced, it is not copied.
point
- the n-dimensional point in double spacepublic DoublePoint(int[] point)
The wrapped array is copied to an internal double array.
point
- the n-dimensional point in integer spacepublic double[] getPoint()
In this implementation of the Clusterable
interface,
the method always returns a reference to an internal array.
getPoint
in interface Clusterable
Copyright © 2016-2022 CS GROUP. All rights reserved.