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.
Constructor and Description |
---|
IntersectionDistance() |
Modifier and Type | Method and Description |
---|---|
double |
distance(Vector one,
Vector other)
Calculate the distance between two vectors.
|
public double distance(Vector one, Vector other)
DistanceMeasure
distance
in interface DistanceMeasure
one
- The first vector.other
- The other vector