com.aliasi.util
Interface Proximity<E>

Type Parameters:
E - the type of objects between which proximity is defined
All Known Subinterfaces:
KernelFunction
All Known Implementing Classes:
CosineDistance, DotProductKernel, EditDistance, FixedWeightEditDistance, GaussianRadialBasisKernel, HyperbolicTangentKernel, JaccardDistance, JaroWinklerDistance, PolynomialKernel, TfIdfDistance, TokenizedDistance, WeightedEditDistance

public interface Proximity<E>

The Proximity interface provides a general method for defining closeness between two objects. Proximity is a similarity measure, with two objects having higher proximity being more similar to one another. It provides a single method proximity(Object,Object) returning the proximity between two objects. The closer two objects are, the higher their proximity value.

Proximity runs in the other direction from distance. With distance, the closer two objects are, the lower their distance value. Many classes implement both Proximity and Distance, with one method defined in terms of the other. For instance, negation converts a distance into a proximity.

Since:
LingPipe3.0
Version:
3.0
Author:
Bob Carpenter

Method Summary
 double proximity(E e1, E e2)
          Returns the distance between the specified pair of objects.
 

Method Detail

proximity

double proximity(E e1,
                 E e2)
Returns the distance between the specified pair of objects.

Parameters:
e1 - First object.
e2 - Second object.
Returns:
Proximity between the two objects.