be.hogent.tarsos.lsh.families
Class CosineDistance

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

public class CosineDistance
extends java.lang.Object
implements DistanceMeasure


Constructor Summary
CosineDistance()
           
 
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

CosineDistance

public CosineDistance()
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.