X
- the class of the elements in the left input sequence.Y
- the class of the elements in the right input sequence.public class AlignmentMap<X,Y> extends Object implements DerivableAlignmentDistance<X,Y>
Constructor and Description |
---|
AlignmentMap() |
Modifier and Type | Method and Description |
---|---|
double |
averageScore()
Returns the average score according to the given weighting scheme.
|
double[] |
computeGradient(DerivableComparator<X,Y> comp)
This computes the gradient of this DerivableAlignmentDistance w.r.t. the parameters of the
given Comparator.
|
List<Alignment<X,Y>> |
getAlignments(double score)
Returns all Alignments for the given score.
|
List<Alignment<X,Y>> |
getAllAlignments()
Returns all Alignments stored in this map in order of their score (from good/low to
bad/high).
|
double |
getDistance()
Returns the average distance of all stored Alignments.
|
List<X> |
getLeft()
Returns the left sequence of this distance.
|
List<Y> |
getRight()
Returns the right sequence of this distance.
|
List<Double> |
getScores()
Get all scores (sorted from low to high) for which Alignments exist within this map.
|
int |
getSize()
Returns the number of Alignments stored in this map.
|
double |
highestScore()
Returns the highest/worst score stored in this map.
|
double |
lowestScore()
Returns the lowest/best score stored in this map.
|
void |
put(Alignment<X,Y> path)
Adds a new Alignment to this map.
|
List<Alignment<X,Y>> |
removeAlignments(double score)
Removes all Alignments with the given score from the map and returns them.
|
double[][] |
toMatrix()
This transforms the AlignmentMap to a matrix, mostly for visualization purposes.
|
public void put(@NonNull Alignment<X,Y> path)
path
- a new Alignment.public int getSize()
public List<Alignment<X,Y>> getAllAlignments()
public List<Alignment<X,Y>> getAlignments(double score)
score
- a score.public List<Double> getScores()
public List<Alignment<X,Y>> removeAlignments(double score)
score
- a score.public double lowestScore()
public double highestScore()
public double averageScore()
public double[] computeGradient(@NonNull DerivableComparator<X,Y> comp)
DerivableAlignmentDistance
computeGradient
in interface DerivableAlignmentDistance<X,Y>
comp
- the DerivableComparator that was used in computing this distance.public double[][] toMatrix()
public double getDistance()
getDistance
in interface DerivableAlignmentDistance<X,Y>
public List<X> getLeft()
DerivableAlignmentDistance
getLeft
in interface DerivableAlignmentDistance<X,Y>
public List<Y> getRight()
DerivableAlignmentDistance
getRight
in interface DerivableAlignmentDistance<X,Y>
Copyright (C) 2016-2018 Benjamin Paaßen, 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/