public interface DerivableComparator<X,Y>
extends Comparator<X,Y>
This is an interface for comparators that have derivable parameters. An implementation should be
able to provide the gradient of the comparison function w.r.t. all of its parameters, listed in
vector form.
Note that the derivative of a parameter is always (!) a double value according to the current
schemes. Other parameters than doubles are not supported in the current format.
Author:
Benjamin Paassen - bpaassen(at)techfak.uni-bielefeld.de
Computes the gradient of this comparator function w.r.t. all parameters of this comparator.
Please note that a and b might be null.
Parameters:
type - the type of alignment operation to be used
a - the left input.
b - the right input.
Returns:
the gradient of this comparator function w.r.t. all parameters of this comparator.
getNumberOfParameters
int getNumberOfParameters()
This shall return the number of parameters of this comparator. The implementation of this
interface has to ensure that parameters are uniquely identified with indices i between 0 and
the number returned by this method (exclusive).
Returns:
the number of parameters of this comparator.
getParameters
double[] getParameters()
Return the current value of all parameters of this comparator. The ordering of the parameters
is consistent with the ordering in the gradient vector.
Returns:
the current value of all parameters of this comparator.
setParameters
void setParameters(@NonNull
double[] params)
Sets the current value of all parameters of this comparator. The ordering of the parameters
is consistent with the ordering in the gradient vector.
Parameters:
params - the new value of all parameters of this comparator.
Copyright (C) 2016 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/