public class EuclideanDistanceMetric extends AbstractCloneableSerializable implements Metric<Vectorizable>
EuclideanDistanceMetric implements a distance metric that
computes the Euclidean distance between two points.| Modifier and Type | Field and Description |
|---|---|
static EuclideanDistanceMetric |
INSTANCE
An instance of EuclideanDistanceMetric to use since the class has no
internal data.
|
| Constructor and Description |
|---|
EuclideanDistanceMetric()
Creates a new instance of EuclideanDistanceMetric.
|
| Modifier and Type | Method and Description |
|---|---|
double |
evaluate(Vectorizable first,
Vectorizable second)
Evaluates the Euclidean distance between the two given vectors.
|
clonepublic static final EuclideanDistanceMetric INSTANCE
public EuclideanDistanceMetric()
public double evaluate(Vectorizable first, Vectorizable second)
evaluate in interface DivergenceFunction<Vectorizable,Vectorizable>first - The first Vector.second - The second Vector.