public abstract class AbstractStrictDTWAlgorithm<R> extends Object implements AlignmentAlgorithm<R>
Constructor and Description |
---|
AbstractStrictDTWAlgorithm(Class<R> resultClass,
AlignmentSpecification specification) |
Modifier and Type | Method and Description |
---|---|
R |
calculateAlignment(Sequence a,
Sequence b)
This calculates the alignment between the Sequences a and b and returns
it as an instance of the result class for this algorithm.
|
double[][] |
getLastDTWMatrix()
This returns the dynamic programming matrix that was calculated
in the last call of calculateAlignment.
|
Class<R> |
getResultClass()
This method shall return the class of the alignment result.
|
AlignmentSpecification |
getSpecification()
This should return the specification that is used for this Algorithm.
|
double |
getWeightThreshold() |
void |
setWeightThreshold(double weightThreshold)
Set a weight threshold (between 0 and 1) that determines which keywords
should be ignored during calculation because their weight is negligible.
|
abstract R |
transformToResult(double[][] dtwMatrix,
Sequence a,
Sequence b)
This method has to be implemented by sub classes to transform
a calculated dynamic programming matrix to a valid result of
that implementation.
|
public AbstractStrictDTWAlgorithm(Class<R> resultClass, AlignmentSpecification specification)
public Class<R> getResultClass()
getResultClass
in interface AlignmentAlgorithm<R>
public AlignmentSpecification getSpecification()
getSpecification
in interface AlignmentAlgorithm<R>
public double[][] getLastDTWMatrix()
public void setWeightThreshold(double weightThreshold)
weightThreshold
- a weight threshold (between 0 and 1)public double getWeightThreshold()
public R calculateAlignment(Sequence a, Sequence b)
calculateAlignment
in interface AlignmentAlgorithm<R>
a
- The first sequence.b
- The second sequence.public abstract R transformToResult(double[][] dtwMatrix, Sequence a, Sequence b)
dtwMatrix
- a dynamic programming matrix calculated with respect to
both input sequences.a
- the first input sequence.b
- the second input sequence.Copyright (C) 2013-2015 Benjamin Paaßen, Georg Zentgraf, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/