Interface DistanceAlgorithm<T>

Type Parameters:
T - the type of the vector
All Known Implementing Classes:
AbstractDistance, CosineDistance, InnerProductDistance, L2SquaredDistance

public interface DistanceAlgorithm<T>
An algorithm that can calculate distance to a given vector.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    distance(Vector<T> v1, Vector<T> v2)
    Calculate the distance between the specified vectors.
  • Method Details

    • distance

      double distance(Vector<T> v1, Vector<T> v2)
      Calculate the distance between the specified vectors.
      Parameters:
      v1 - the vector to calculate the distance from
      v2 - the vector to calculate the distance to
      Returns:
      the distance between the specified vectors