Interface KdTreeDistance<P>

All Known Implementing Classes:
KdTreeEuclideanSq_F64, KdTreeEuclideanSq_U8

public interface KdTreeDistance<P>
Computes the distance between two points. Each point is a tuple.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    distance(P a, P b)
    Computes the distance between the two input points
    int
    Number of elements in the point
    double
    valueAt(P point, int index)
    Returns the value of an element in the point
  • Method Details

    • distance

      double distance(P a, P b)
      Computes the distance between the two input points
      Parameters:
      a - point
      b - point
      Returns:
      distance
    • valueAt

      double valueAt(P point, int index)
      Returns the value of an element in the point
      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

      int length()
      Number of elements in the point