|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.linalg.AbstractMetric
Class which defines distance and similarity functions once we have a norm
Constructor Summary | |
AbstractMetric()
|
Method Summary | |
double |
distance(Array i,
Array j)
returns the distance between i and j according to the metric defined in this class |
abstract double |
norm(Array i)
returns the norm of a vector in this metric |
Array |
normalize(Array i)
normalizes vector i to have length 1 in the norm defined in this class |
double |
similarity(Array i,
Array j)
returns the similarity of document i and j according to the similarity measure defined in this class, which is 2-distance(i,j) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractMetric()
Method Detail |
public abstract double norm(Array i)
norm
in interface Metric
public double distance(Array i, Array j)
distance
in interface Metric
public double similarity(Array i, Array j)
similarity
in interface Similarity
public Array normalize(Array i)
normalize
in interface Metric
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |