X
- the class of left-hand values for this comparator.Y
- the class of right-hand values for this comparator.public abstract class ComparisonBasedSkipExtendedComparator<X,Y> extends SkipExtendedComparator<X,Y>
Constructor and Description |
---|
ComparisonBasedSkipExtendedComparator(Y deleteComparison,
X insertComparison) |
ComparisonBasedSkipExtendedComparator(Y deleteComparison,
X insertComparison,
Y skipDeleteComparison,
X skipInsertComparison) |
Modifier and Type | Method and Description |
---|---|
double |
compare(OperationType type,
X a,
Y b)
This method returns a dissimilarity between x and y using the alignment operation op with the
following restrictions:
compare(op,x,y) ≥ 0 (non-negativity)
compare(op,x,y) ≤ 1 (normalization)
x = y ⇒ compare(op,x,y) = 0 (equality)
Further, this function guarantees consistency with respect to null inputs, that is, for any
operation op ∈ {REPLACEMENT, DELETIONREPLACEMENT, INSERTIONREPLACEMENT} it holds:
d(op, x, null) = d(DELETION, x, null)
d(op, null, y) = d(INSERTION, null, y)
and for any operation it holds:
d(op, null, null) = 0
Please note that a and b might be null if this alignment uses gaps or
skips.
|
Gradient |
computeGradient(OperationType type,
X a,
Y b)
Computes the gradient of this comparator function w.r.t.
|
boolean |
equals(Object obj) |
int |
hashCode() |
actualCompare, computeComparisonGradient, getComparisonParameters, getNumberOfComparisonParameters, getNumberOfParameters, getParameters, hasCoherentReplacementCost, setComparisonParameters, setParameters, supports
public ComparisonBasedSkipExtendedComparator(@NonNull Y deleteComparison, @NonNull X insertComparison, @NonNull Y skipDeleteComparison, @NonNull X skipInsertComparison)
public double compare(@NonNull OperationType type, X a, Y b)
Comparator
compare
in interface Comparator<X,Y>
compare
in class SkipExtendedComparator<X,Y>
type
- the type of alignment operation to be used.a
- the left input.b
- the right input.public Gradient computeGradient(OperationType type, X a, Y b)
DerivableComparator
computeGradient
in interface DerivableComparator<X,Y>
computeGradient
in class SkipExtendedComparator<X,Y>
type
- the type of alignment operation to be useda
- the left input.b
- the right input.public int hashCode()
hashCode
in class SkipExtendedComparator<X,Y>
public boolean equals(Object obj)
equals
in class SkipExtendedComparator<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/