org.finetracker
Interface DistanceCalculation

All Known Implementing Classes:
AvgSquareDist

public interface DistanceCalculation

This interface specifies the method to calculate the distance between two vectors. These vectors are made of arrays of doubles. This interface is built to make it easier to switch between distance-calculation implementations.

Author:
Frank Kusters

Method Summary
 double calcDistance(double[] from, double[] to)
          Calculate the distance between two vectors.
 

Method Detail

calcDistance

double calcDistance(double[] from,
                    double[] to)
Calculate the distance between two vectors. The implementing class must make sure that calcDistance(a,b) == calcDistance(b,a), and that the result is never negative.

Parameters:
from - the first vector
to - the second vector
Returns:
the distance between the input vectors