org.hackystat.projectbrowser.page.trajectory.dtw.step
Class AbstractStepFunction

java.lang.Object
  extended by org.hackystat.projectbrowser.page.trajectory.dtw.step.AbstractStepFunction
Direct Known Subclasses:
AsymmetricStepFunction, SymmetricStepFunction

public abstract class AbstractStepFunction
extends java.lang.Object

Defines the stepfunction for the DTW.

Author:
Pavel Senin

Constructor Summary
AbstractStepFunction()
           
 
Method Summary
abstract  java.awt.Point doStep(java.awt.Point position, double[][] costMatrix, AbstractConstraintFunction constraints)
          Calculates the next step given the cost matrix and constraints.
abstract  double[][] getCostMatrix(double[][] distanceMatrix)
          Get the local cost matrix using the step function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStepFunction

public AbstractStepFunction()
Method Detail

doStep

public abstract java.awt.Point doStep(java.awt.Point position,
                                      double[][] costMatrix,
                                      AbstractConstraintFunction constraints)
Calculates the next step given the cost matrix and constraints.

Parameters:
position - the current position.
costMatrix - the distance matrix.
constraints - the constraints function.
Returns:
The next step.

getCostMatrix

public abstract double[][] getCostMatrix(double[][] distanceMatrix)
Get the local cost matrix using the step function.

Parameters:
distanceMatrix - The distance matrix to use.
Returns:
computed cost matrix.