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