X
- the class of input values for this comparator.public class TrivialEditComparator<X> extends SkipExtendedComparator<X,X>
Constructor and Description |
---|
TrivialEditComparator() |
Modifier and Type | Method and Description |
---|---|
double |
actualCompare(X a,
X b)
This has to return a distance between a and b with the following restrictions:
The return value has to lie between 0 and 1.
|
Gradient |
computeComparisonGradient(X a,
X b)
Computes the gradient of the comparator function w.r.t. all parameters of this comparator.
|
double[] |
getComparisonParameters()
Return the current value of all parameters of this comparator.
|
int |
getNumberOfComparisonParameters()
Implementing classes should return the number of (derivative-relevant) parameters used for
the compare-function.
|
void |
setComparisonParameters(double[] params)
Sets the current value of all parameters of this comparator.
|
compare, computeGradient, equals, getNumberOfParameters, getParameters, hasCoherentReplacementCost, hashCode, setParameters, supports
public double actualCompare(@NonNull X a, @NonNull X b)
SkipExtendedComparator
actualCompare
in class SkipExtendedComparator<X,X>
a
- the left input.b
- the right input.public Gradient computeComparisonGradient(@NonNull X a, @NonNull X b)
SkipExtendedComparator
computeComparisonGradient
in class SkipExtendedComparator<X,X>
a
- the left input.b
- the right input.public int getNumberOfComparisonParameters()
SkipExtendedComparator
getNumberOfComparisonParameters
in class SkipExtendedComparator<X,X>
public double[] getComparisonParameters()
SkipExtendedComparator
getComparisonParameters
in class SkipExtendedComparator<X,X>
public void setComparisonParameters(@NonNull double[] params)
SkipExtendedComparator
setComparisonParameters
in class SkipExtendedComparator<X,X>
params
- the new value of all parameters of this comparator.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/