gov.sandia.cognition.learning.function.distance
Class EuclideanDistanceSquaredMetric

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.distance.EuclideanDistanceSquaredMetric
All Implemented Interfaces:
DivergenceFunction<Vectorizable,Vectorizable>, Semimetric<Vectorizable>, CloneableSerializable, Serializable, Cloneable

public class EuclideanDistanceSquaredMetric
extends AbstractCloneableSerializable
implements Semimetric<Vectorizable>

The EuclideanDistanceSquaredMetric implements a distance metric that computes the squared Euclidean distance between two points.

Since:
2.0
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
static EuclideanDistanceSquaredMetric INSTANCE
          An instance of EuclideanDistanceSquaredMetric to use since the class has no internal data.
 
Constructor Summary
EuclideanDistanceSquaredMetric()
          Creates a new instance of EuclideanDistanceSquaredMetric.
 
Method Summary
 double evaluate(Vectorizable first, Vectorizable second)
          The evaluates the squared Euclidean distance between the two given vectors.
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

INSTANCE

public static final EuclideanDistanceSquaredMetric INSTANCE
An instance of EuclideanDistanceSquaredMetric to use since the class has no internal data.

Constructor Detail

EuclideanDistanceSquaredMetric

public EuclideanDistanceSquaredMetric()
Creates a new instance of EuclideanDistanceSquaredMetric.

Method Detail

evaluate

public double evaluate(Vectorizable first,
                       Vectorizable second)
The evaluates the squared Euclidean distance between the two given vectors.

Specified by:
evaluate in interface DivergenceFunction<Vectorizable,Vectorizable>
Parameters:
first - The first Vector.
second - The second Vector.
Returns:
The squared Euclidean distance between the two given vectors.