public class PathMap extends Object implements AlignmentDerivativeAlgorithm
Constructor and Description |
---|
PathMap() |
Modifier and Type | Method and Description |
---|---|
double |
averageScore()
Returns the average score according to the given weighting scheme.
|
<X extends Value,Y> |
calculateParameterDerivative(DerivableComparator<X,Y> comp,
String keyword)
This returns the derivatives for all parameters of the given comparator
according to the implementation.
|
<X extends Value,Y> |
calculateRawParameterDerivative(DerivableComparator<X,Y> comp,
String keyword)
This returns the derivatives for all parameters of the given comparator
according to the implementation.
|
double[] |
calculateWeightDerivative()
Calculates the derivative for each keyword weight.
|
List<AlignmentPath> |
getAllPaths()
Returns all paths stored in this map in order of their score (from
good/low to bad/high).
|
double |
getDistance()
Returns the average distance of all stored paths.
|
Sequence |
getLeft()
Returns the left sequence of this derivative.
|
List<AlignmentPath> |
getPaths(double score)
Returns all paths with the given score.
|
Sequence |
getRight()
Returns the right sequence of this derivative.
|
List<Double> |
getScores()
Get all scores for which paths exist within this map.
|
int |
getSize()
Returns the number of paths stored in this map.
|
ScoreBasedWeighting |
getWeighting()
Returns the weighting that is used during derivative calculation.
|
double |
highestScore()
Returns the highest/worst score stored in this map.
|
double |
lowestScore()
Returns the lowest/best score stored in this map.
|
void |
put(AlignmentPath path)
Adds a new AlignmentPath to this map.
|
List<AlignmentPath> |
removeValues(double score)
Removes all AlignmentPaths with the given score from the map and returns
them.
|
void |
setWeighting(ScoreBasedWeighting weighting)
Sets the weighting that is used during derivative calculation.
|
double[][] |
toMatrix()
This transforms the PathMap to a matrix, mostly for visualization
purposes.
|
public ScoreBasedWeighting getWeighting()
public void setWeighting(ScoreBasedWeighting weighting)
weighting
- the weighting that is used during derivative
calculation.public void put(AlignmentPath path)
path
- a new AlignmentPath.public int getSize()
public List<AlignmentPath> getAllPaths()
public List<AlignmentPath> getPaths(double score)
score
- a score.public List<Double> getScores()
public List<AlignmentPath> removeValues(double score)
score
- a score.public double lowestScore()
public double highestScore()
public double averageScore()
public <X extends Value,Y> Y calculateParameterDerivative(DerivableComparator<X,Y> comp, String keyword)
calculateParameterDerivative
in interface AlignmentDerivativeAlgorithm
X
- the values the given comparator can compare.Y
- the result format for derivatives of the given comparator.comp
- the DerivableComparator that provides functionality to
calculate local derivatives.keyword
- the keyword for which the given comparator was used in
the Alignment.public <X extends Value,Y> double[] calculateRawParameterDerivative(DerivableComparator<X,Y> comp, String keyword)
calculateRawParameterDerivative
in interface AlignmentDerivativeAlgorithm
X
- the values the given comparator can compare.comp
- the DerivableComparator that provides functionality to
calculate local derivatives.keyword
- the keyword for which the given comparator was used in
the Alignment.public double[] calculateWeightDerivative()
calculateWeightDerivative
in interface AlignmentDerivativeAlgorithm
public double[][] toMatrix()
public double getDistance()
getDistance
in interface AlignmentDerivativeAlgorithm
public Sequence getLeft()
getLeft
in interface AlignmentDerivativeAlgorithm
public Sequence getRight()
getRight
in interface AlignmentDerivativeAlgorithm
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