X
- the class of the elements in the left input sequence.Y
- the class of the elements in the right input sequence.public class Alignment<X,Y> extends ArrayList<Operation<X,Y>> implements DerivableAlignmentDistance<X,Y>
modCount
Constructor and Description |
---|
Alignment(Alignment<X,Y> copy)
A copy constructor.
|
Alignment(Comparator<X,Y> comparator,
List<X> left,
List<Y> right,
double distance) |
Alignment(List<Operation<X,Y>> operations,
Comparator<X,Y> comparator,
List<X> left,
List<Y> right,
double distance) |
Modifier and Type | Method and Description |
---|---|
double[] |
computeGradient(DerivableComparator<X,Y> comp)
This computes the gradient of this DerivableAlignmentDistance w.r.t.
|
double |
getDistance()
Returns the distance between the two input sequences.
|
List<X> |
getLeft()
Returns the left sequence of this distance.
|
List<Y> |
getRight()
Returns the right sequence of this distance.
|
double[][] |
toMatrix()
This transforms the Alignment to a matrix, mostly for visualization
purposes.
|
String |
toString() |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public Alignment(@NonNull List<Operation<X,Y>> operations, @NonNull Comparator<X,Y> comparator, @NonNull List<X> left, @NonNull List<Y> right, double distance)
public Alignment(@NonNull Comparator<X,Y> comparator, @NonNull List<X> left, @NonNull List<Y> right, double distance)
public List<X> getLeft()
DerivableAlignmentDistance
getLeft
in interface DerivableAlignmentDistance<X,Y>
public List<Y> getRight()
DerivableAlignmentDistance
getRight
in interface DerivableAlignmentDistance<X,Y>
public double getDistance()
DerivableAlignmentDistance
getDistance
in interface DerivableAlignmentDistance<X,Y>
public double[][] toMatrix()
public double[] computeGradient(DerivableComparator<X,Y> comp)
DerivableAlignmentDistance
computeGradient
in interface DerivableAlignmentDistance<X,Y>
comp
- the DerivableComparator that was used in computing this distance.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/