V
- the value type this Comparator is defined on.public abstract class ComparisonBasedSkipExtendedComparator<V extends Value> extends SkipExtendedComparator<V>
Constructor and Description |
---|
ComparisonBasedSkipExtendedComparator(V deleteComparison,
V insertComparison,
V skipDeleteComparison,
V skipInsertComparison) |
Modifier and Type | Method and Description |
---|---|
double |
calculateLocalDerivative(int paramIdx,
V a,
V b,
OperationType type)
This is called by an AlignmentDerivativeAlgorithm and should calculate
the local derivative for only one comparison of the values a and b.
|
SparseLocalDerivative |
calculateSparseLocalDerivative(V a,
V b,
OperationType type)
This method shall return a sparse representation of the derivative for
all parameters that have non-zero derivatives in this step of the
alignment.
|
double |
delete(V a)
This should be called during an alignment to retrieve the costs for a
deletion of value a from the first sequence.
|
boolean |
equals(Object obj) |
V |
getDeleteComparison()
Returns the comparison value that is used to compute the cost of
deletions if the dynamic flag is set to true.
|
V |
getInsertComparison()
Returns the comparison value that is used to compute the cost of
insertions if the dynamic flag is set to true.
|
V |
getSkipDeleteComparison()
Returns the comparison value that is used to compute the cost of
skip-deletions if the dynamic flag is set to true.
|
double |
getSkipFactor()
Returns the cost factor for skipDeletions and skipInsertions for
a dynamic comparison.
|
V |
getSkipInsertComparison()
Returns the comparison value that is used to compute the cost of
skip-insertions if the dynamic flag is set to true.
|
int |
hashCode() |
double |
insert(V b)
This should be called during an alignment to retrieve the costs for an
insertion of value b into the first sequence.
|
boolean |
isDynamic()
Returns true if and only if this comparator will use a dynamic
method to determine deletion, insertion and skip costs.
|
void |
setDeleteComparison(V deleteComparison)
Sets the comparison value that is used to compute the cost of
deletions if the dynamic flag is set to true.
|
void |
setDynamic(boolean dynamic)
Set to true if and only if this comparator shall use a dynamic
method to determine deletion, insertion and skip costs.
|
void |
setInsertComparison(V insertComparison)
Sets the comparison value that is used to compute the cost of
insertions if the dynamic flag is set to true.
|
void |
setSkipDeleteComparison(V skipDeleteComparison)
Sets the comparison value that is used to compute the cost of
skip-deletions if the dynamic flag is set to true.
|
void |
setSkipFactor(double skipFactor)
Sets the cost factor for skipDeletions and skipInsertions for
a dynamic comparison.
|
void |
setSkipInsertComparison(V skipInsertComparison)
Sets the comparison value that is used to compute the cost of
skip-insertions if the dynamic flag is set to true.
|
double |
skipDelete(V a)
This should be called during an alignment to retrieve the costs for a
skip deletion of value a from the first sequence.
|
double |
skipInsert(V b)
This should be called during an alignment to retrieve the costs for a
skip insertion of value b into the first sequence.
|
comparisonDerivative, getDeletionCost, getInsertionCost, getNumberOfComparisonParameters, getNumberOfParameters, getResultClass, getSkipDeletionCost, getSkipInsertionCost, setDeletionCost, setInsertionCost, setSkipDeletionCost, setSkipInsertionCost, sparseComparisonDerivative, transformToResult
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compare, getType
public boolean isDynamic()
public void setDynamic(boolean dynamic)
dynamic
- true if and only if this comparator shall use a dynamic
method to determine deletion, insertion and skip costs.public double getSkipFactor()
public void setSkipFactor(double skipFactor)
skipFactor
- the cost factor for skipDeletions and skipInsertions
for a dynamic comparison.public V getDeleteComparison()
public void setDeleteComparison(V deleteComparison)
deleteComparison
- the comparison value that is used to compute the
cost of deletions if the dynamic flag is set to true.public V getInsertComparison()
public void setInsertComparison(V insertComparison)
insertComparison
- the comparison value that is used to compute the
cost of insertions if the dynamic flag is set to true.public V getSkipDeleteComparison()
public void setSkipDeleteComparison(V skipDeleteComparison)
skipDeleteComparison
- the comparison value that is used to compute
the cost of skip-deletions if the dynamic flag is set to true.public V getSkipInsertComparison()
public void setSkipInsertComparison(V skipInsertComparison)
skipInsertComparison
- the comparison value that is used to compute
the cost of skip-insertions if the dynamic flag is set to true.public double delete(V a)
delete
in interface GapComparator<V extends Value>
delete
in class SkipExtendedComparator<V extends Value>
a
- a value.public double insert(V b)
insert
in interface GapComparator<V extends Value>
insert
in class SkipExtendedComparator<V extends Value>
b
- a value.public double skipDelete(V a)
skipDelete
in interface SkipComparator<V extends Value>
skipDelete
in class SkipExtendedComparator<V extends Value>
a
- a value.public double skipInsert(V b)
skipInsert
in interface SkipComparator<V extends Value>
skipInsert
in class SkipExtendedComparator<V extends Value>
b
- a value.public double calculateLocalDerivative(int paramIdx, V a, V b, OperationType type)
calculateLocalDerivative
in interface DerivableComparator<V extends Value,double[]>
calculateLocalDerivative
in class SkipExtendedComparator<V extends Value>
paramIdx
- the index for this parameters.a
- the value that has been compared with b.b
- the value that has been compared with a.type
- the operation type that has actually been used in the
comparison.public SparseLocalDerivative calculateSparseLocalDerivative(V a, V b, OperationType type)
calculateSparseLocalDerivative
in interface SparseDerivableComparator<V extends Value,double[]>
calculateSparseLocalDerivative
in class SkipExtendedComparator<V extends Value>
a
- the value that has been compared with b.b
- the value that has been compared with a.type
- the operation type that has actually been used in the
comparison.public int hashCode()
hashCode
in class SkipExtendedComparator<V extends Value>
public boolean equals(Object obj)
equals
in class SkipExtendedComparator<V extends Value>
Copyright (C) 2013-2015 Benjamin Paaßen, Georg Zentgraf, 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/