be.hogent.tarsos.lsh.families
Class IntersectionDistance
java.lang.Object
be.hogent.tarsos.lsh.families.IntersectionDistance
- All Implemented Interfaces:
- DistanceMeasure
public class IntersectionDistance
- extends java.lang.Object
- implements DistanceMeasure
Calculates the intersection of one vector with an other vector. Intersection
is normally between 0 and 1. 1 meaning 100% overlap. To make it a distance
measure, 1 - intersection is done, so 1 becomes no intersection, 0 total
overlap.
This distance measure has no related hash family.
- Author:
- Joren Six
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 |
IntersectionDistance
public IntersectionDistance()
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.