Package elki.data

Interface NumberVector

    • Method Detail

      • getValue

        @Deprecated
        default java.lang.Number getValue​(int dimension)
        Deprecated.
        Description copied from interface: FeatureVector
        Returns the value in the specified dimension.
        Specified by:
        getValue in interface FeatureVector<java.lang.Number>
        Parameters:
        dimension - the desired dimension, where 0 ≤ dimension ≤ this.getDimensionality()-1
        Returns:
        the value in the specified dimension
      • getMin

        default double getMin​(int dimension)
        Description copied from interface: SpatialComparable
        Returns the minimum coordinate at the specified dimension.
        Specified by:
        getMin in interface SpatialComparable
        Parameters:
        dimension - the dimension for which the coordinate should be returned, where 0 ≤ dimension < getDimensionality()
        Returns:
        the minimum coordinate at the specified dimension
      • getMax

        default double getMax​(int dimension)
        Description copied from interface: SpatialComparable
        Returns the maximum coordinate at the specified dimension.
        Specified by:
        getMax in interface SpatialComparable
        Parameters:
        dimension - the dimension for which the coordinate should be returned, where 0 ≤ dimension < getDimensionality()
        Returns:
        the maximum coordinate at the specified dimension
      • doubleValue

        double doubleValue​(int dimension)
        Returns the value in the specified dimension as double.

        Note: this might seem redundant with respect to getValue(dim).doubleValue(), but usually this is much more efficient due to boxing/unboxing cost.

        Parameters:
        dimension - the desired dimension, where 0 ≤ dimension < this.getDimensionality()
        Returns:
        the value in the specified dimension
      • floatValue

        default float floatValue​(int dimension)
        Returns the value in the specified dimension as float.

        Note: this might seem redundant with respect to getValue(dim).floatValue(), but usually this is much more efficient due to boxing/unboxing cost.

        Parameters:
        dimension - the desired dimension, where 0 ≤ dimension < this.getDimensionality()
        Returns:
        the value in the specified dimension
      • intValue

        default int intValue​(int dimension)
        Returns the value in the specified dimension as int.

        Note: this might seem redundant with respect to getValue(dim).intValue(), but usually this is much more efficient due to boxing/unboxing cost.

        Parameters:
        dimension - the desired dimension, where 0 ≤ dimension < this.getDimensionality()
        Returns:
        the value in the specified dimension
      • longValue

        long longValue​(int dimension)
        Returns the value in the specified dimension as long.

        Note: this might seem redundant with respect to getValue(dim).longValue(), but usually this is much more efficient due to boxing/unboxing cost.

        Parameters:
        dimension - the desired dimension, where 0 ≤ dimension < this.getDimensionality()
        Returns:
        the value in the specified dimension
      • shortValue

        default short shortValue​(int dimension)
        Returns the value in the specified dimension as short.

        Note: this might seem redundant with respect to getValue(dim).shortValue(), but usually this is much more efficient due to boxing/unboxing cost.

        Parameters:
        dimension - the desired dimension, where 0 ≤ dimension < this.getDimensionality()
        Returns:
        the value in the specified dimension
      • byteValue

        default byte byteValue​(int dimension)
        Returns the value in the specified dimension as byte.

        Note: this might seem redundant with respect to getValue(dim).byteValue(), but usually this is much more efficient due to boxing/unboxing cost.

        Parameters:
        dimension - the desired dimension, where 0 ≤ dimension < this.getDimensionality()
        Returns:
        the value in the specified dimension
      • toArray

        double[] toArray()
        Returns a double array copy of this vector.
        Returns:
        Copy as double[]