public class DoublePoint extends java.lang.Object implements Clusterable, java.io.Serializable
Clusterable
for points with double coordinates.Modifier and Type | Field and Description |
---|---|
private double[] |
point
Point coordinates.
|
private static long |
serialVersionUID
Serializable version identifier.
|
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(java.lang.Object other) |
double[] |
getPoint()
Gets the n-dimensional point.
|
int |
hashCode() |
java.lang.String |
toString() |
private static final long serialVersionUID
private final double[] point
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()
getPoint
in interface Clusterable
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2003-2016 Apache Software Foundation