Class KdTreeEuclideanSq_U8

java.lang.Object
org.ddogleg.nn.alg.distance.KdTreeEuclideanSq_U8
All Implemented Interfaces:
KdTreeDistance<byte[]>

public class KdTreeEuclideanSq_U8
extends Object
implements KdTreeDistance<byte[]>
Euclidian squared distance
  • Constructor Details

    • KdTreeEuclideanSq_U8

      public KdTreeEuclideanSq_U8​(int n)
  • Method Details

    • distance

      public double distance​(byte[] a, byte[] b)
      Description copied from interface: KdTreeDistance
      Computes the distance between the two input points
      Specified by:
      distance in interface KdTreeDistance<byte[]>
      Parameters:
      a - point
      b - point
      Returns:
      distance
    • valueAt

      public double valueAt​(byte[] point, int index)
      Description copied from interface: KdTreeDistance
      Returns the value of an element in the point
      Specified by:
      valueAt in interface KdTreeDistance<byte[]>
      Parameters:
      point - (Input) the point
      index - Which element in the point is to be read
      Returns:
      The value of the element in the point.
    • length

      public int length()
      Description copied from interface: KdTreeDistance
      Number of elements in the point
      Specified by:
      length in interface KdTreeDistance<byte[]>