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

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

public class DTWAlignment
extends java.lang.Object

Envelope for the DTW transform.

Author:
Pavel Senin.

Field Summary
(package private)  java.text.NumberFormat decFormatter
           
(package private)  java.text.NumberFormat pathFormatter
           
(package private)  java.text.NumberFormat warpFormatter
           
 
Constructor Summary
DTWAlignment()
           
 
Method Summary
 void doAlignment()
          Performs the actual alignment.
 java.util.List<java.awt.Point> getPath()
          Get the DTW path.
 double getPostDistnace()
          Get the post-alignment distance.
 double[] getWarpingQuery()
          Get the warping query.
 void setDistanceMatrix(double[][] distances)
          Set the local cost matrix.
 void setQuery(double[][] query)
          Set the query time-series.
 void setStepFunction(java.lang.String stepPattern)
          Set the step function.
 void setTemplate(double[][] template)
          Set the template time-series.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

decFormatter

java.text.NumberFormat decFormatter

warpFormatter

java.text.NumberFormat warpFormatter

pathFormatter

java.text.NumberFormat pathFormatter
Constructor Detail

DTWAlignment

public DTWAlignment()
Method Detail

setQuery

public void setQuery(double[][] query)
              throws DTWException
Set the query time-series.

Parameters:
query - The query time series.
Throws:
DTWException - if error occures.

setTemplate

public void setTemplate(double[][] template)
                 throws DTWException
Set the template time-series.

Parameters:
template - The template time series.
Throws:
DTWException - if error occures.

setStepFunction

public void setStepFunction(java.lang.String stepPattern)
                     throws DTWException
Set the step function.

Parameters:
stepPattern - the selected step function.
Throws:
DTWException - if unable to select a function (invalid name provided).

setDistanceMatrix

public void setDistanceMatrix(double[][] distances)
                       throws DTWException
Set the local cost matrix.

Parameters:
distances - The local cost-matrix.
Throws:
DTWException - if error occures.

doAlignment

public void doAlignment()
Performs the actual alignment.


toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

getPath

public java.util.List<java.awt.Point> getPath()
Get the DTW path.

Returns:
The DTW path.

getWarpingQuery

public double[] getWarpingQuery()
Get the warping query.

Returns:
The warping query.

getPostDistnace

public double getPostDistnace()
Get the post-alignment distance.

Returns:
the post-alignment distance.