be.hogent.tarsos.lsh.families
Class EuclideanDistance

java.lang.Object
  extended by be.hogent.tarsos.lsh.families.EuclideanDistance
All Implemented Interfaces:
DistanceMeasure

public class EuclideanDistance
extends java.lang.Object
implements DistanceMeasure

Calculates the Euclidean distance between two vectors. Sometimes this is also called the L2 distance.

Author:
Joren Six

Constructor Summary
EuclideanDistance()
           
 
Method Summary
 double distance(Vector one, Vector other)
          Calculate the distance between two vectors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EuclideanDistance

public EuclideanDistance()
Method Detail

distance

public double distance(Vector one,
                       Vector other)
Description copied from interface: DistanceMeasure
Calculate the distance between two vectors. From one to two.

Specified by:
distance in interface DistanceMeasure
Parameters:
one - The first vector.
other - The other vector
Returns:
A value representing the distance between two vectors.