edu.umass.cs.mallet.base.types
Class NormalizedDotProductMetric
java.lang.Object
edu.umass.cs.mallet.base.types.NormalizedDotProductMetric
- All Implemented Interfaces:
- CachedMetric, Metric
- public class NormalizedDotProductMetric
- extends java.lang.Object
- implements CachedMetric
Computes
1 - [ / sqrt (*)]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NormalizedDotProductMetric
public NormalizedDotProductMetric()
distance
public double distance(SparseVector a,
SparseVector b)
- Specified by:
distance
in interface Metric
distance
public double distance(SparseVector a,
int hashCodeA,
SparseVector b,
int hashCodeB)
- Specified by:
distance
in interface CachedMetric