org.hackystat.projectbrowser.page.trajectory.dtw
Class EuclideanDistance

java.lang.Object
  extended by org.hackystat.projectbrowser.page.trajectory.dtw.EuclideanDistance

public class EuclideanDistance
extends java.lang.Object

The Euclidean distance implementation.

Author:
Pavel Senin.

Constructor Summary
EuclideanDistance()
           
 
Method Summary
static double getSeriesDistnace(double[][] query, double[][] template)
          Calculates euclidean distance between two time-series of equal length.
static double pointDistance(double[] point1, double[] point2)
          Calculates the Euclidean distance between two points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EuclideanDistance

public EuclideanDistance()
Method Detail

pointDistance

public static double pointDistance(double[] point1,
                                   double[] point2)
                            throws DTWException
Calculates the Euclidean distance between two points.

Parameters:
point1 - The first point.
point2 - The second point.
Returns:
The Euclidean distance.
Throws:
DTWException - In the case of error.

getSeriesDistnace

public static double getSeriesDistnace(double[][] query,
                                       double[][] template)
                                throws DTWException
Calculates euclidean distance between two time-series of equal length.

Parameters:
query - The timeseries1.
template - The timeseries2.
Returns:
The eclidean distance.
Throws:
DTWException - if error occures.