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

java.lang.Object
  extended by org.hackystat.projectbrowser.page.trajectory.dtw.step.AbstractStepFunction
      extended by org.hackystat.projectbrowser.page.trajectory.dtw.step.AsymmetricStepFunction

public class AsymmetricStepFunction
extends AbstractStepFunction

Implements symmetric cost function.

Author:
Pavel Senin.

Field Summary
static java.lang.String STEP_PATTERN_P0
          Step pattern p0 according to Sakoe-Chiba.
static java.lang.String STEP_PATTERN_P05
          Step pattern p05 according to Sakoe-Chiba.
static java.lang.String STEP_PATTERN_P1
          Step pattern p1 according to Sakoe-Chiba.
static java.lang.String STEP_PATTERN_P2
          Step pattern p2 according to Sakoe-Chiba.
 
Constructor Summary
AsymmetricStepFunction(java.lang.String stepPattern)
          Constructor.
 
Method Summary
 java.awt.Point doStep(java.awt.Point position, double[][] distanceMatrix, AbstractConstraintFunction constraints)
          Calculates the next step given the cost matrix and constraints.
 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
 

Field Detail

STEP_PATTERN_P0

public static final java.lang.String STEP_PATTERN_P0
Step pattern p0 according to Sakoe-Chiba.

See Also:
Constant Field Values

STEP_PATTERN_P05

public static final java.lang.String STEP_PATTERN_P05
Step pattern p05 according to Sakoe-Chiba.

See Also:
Constant Field Values

STEP_PATTERN_P1

public static final java.lang.String STEP_PATTERN_P1
Step pattern p1 according to Sakoe-Chiba.

See Also:
Constant Field Values

STEP_PATTERN_P2

public static final java.lang.String STEP_PATTERN_P2
Step pattern p2 according to Sakoe-Chiba.

See Also:
Constant Field Values
Constructor Detail

AsymmetricStepFunction

public AsymmetricStepFunction(java.lang.String stepPattern)
Constructor.

Parameters:
stepPattern - specifies the step pattern.
Method Detail

doStep

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

Specified by:
doStep in class AbstractStepFunction
Parameters:
position - the current position.
distanceMatrix - the distance matrix.
constraints - the constraints function.
Returns:
The next step.

getCostMatrix

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

Specified by:
getCostMatrix in class AbstractStepFunction
Parameters:
distanceMatrix - The distance matrix to use.
Returns:
computed cost matrix.