edu.stanford.nlp.linalg
Interface Metric

All Known Implementing Classes:
AbstractMetric

public interface Metric

Interface for a set of classes which have a metric function distance(Array i, Array j), which returns a double giving the distance between the two vectors


Method Summary
 double distance(Array i, Array j)
          returns the distance between i and j according to the metric defined in this class
 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
 

Method Detail

norm

public double norm(Array i)
returns the norm of a vector in this metric


distance

public double distance(Array i,
                       Array j)
returns the distance between i and j according to the metric defined in this class


normalize

public Array normalize(Array i)
normalizes vector i to have length 1 in the norm defined in this class



Stanford NLP Group