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

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

public class DTWUtilFactory
extends java.lang.Object

Provide implementation of various computational methods for the DTW.

Author:
Pavel Senin

Constructor Summary
DTWUtilFactory()
           
 
Method Summary
static double mean(double[] series)
          Compute the mean of the timeseries.
static double[] normalize(double[] series)
          Normalize timeseries.
static double[][] rBind(double[] axis, double[] seriesData)
          Binds two linear arrays, producing a 2D array.
static double var(double[] series)
          Compute the variance of the timeseries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTWUtilFactory

public DTWUtilFactory()
Method Detail

rBind

public static double[][] rBind(double[] axis,
                               double[] seriesData)
                        throws DTWException
Binds two linear arrays, producing a 2D array.

Parameters:
axis - The first component array.
seriesData - The second component array.
Returns:
Binded rows.
Throws:
DTWException - If error occures.

mean

public static double mean(double[] series)
Compute the mean of the timeseries.

Parameters:
series - The input timeseries.
Returns:
the mean of values.

var

public static double var(double[] series)
Compute the variance of the timeseries.

Parameters:
series - The input timeseries.
Returns:
the variance of values.

normalize

public static double[] normalize(double[] series)
Normalize timeseries.

Parameters:
series - The input timeseries.
Returns:
the normalized time-series.