Class DoublePoint

    • 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.

        In this implementation of the Clusterable interface, the method always returns a reference to an internal array.

        Specified by:
        getPoint in interface Clusterable
        Returns:
        the point array (beware, it may be a reference to an internal array)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object