X
- The node class for the left input forest.Y
- The node class for the right input forest.R
- The result class for this AlignmentAlgorithm.public abstract class AbstractForestAlgorithm<X,Y,R> extends Object implements AlignmentAlgorithm<Tree<X>,Tree<Y>,R>
Constructor and Description |
---|
AbstractForestAlgorithm(Comparator<Tree<X>,Tree<Y>> comparator) |
Modifier and Type | Method and Description |
---|---|
R |
calculateAlignment(List<Tree<X>> X,
List<Tree<Y>> Y)
This calculates the alignment dissimilarity D between the Sequences x ∈ X* and y ∈
Y* and returns it as an instance of the result class for this algorithm.
|
Comparator<Tree<X>,Tree<Y>> |
getComparator()
This should return the Comparator used to compute local distances for this algorithm.
|
boolean |
requires(OperationType type)
This method should return true if and only if this AlignmentAlgorithm uses the given
operation.
|
void |
setComparator(Comparator<Tree<X>,Tree<Y>> comparator)
This should set the Comparator used to compute local distances for this algorithm.
|
abstract R |
transformToResult(double[][] rep,
double[] del,
double[] ins,
List<Tree<X>> X,
List<Tree<Y>> Y)
Transforms the pairwise tree edit distances between the trees in the left and right forest to
an overall forest edit distance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResultClass
public AbstractForestAlgorithm(@NonNull Comparator<Tree<X>,Tree<Y>> comparator)
public Comparator<Tree<X>,Tree<Y>> getComparator()
AlignmentAlgorithm
getComparator
in interface AlignmentAlgorithm<Tree<X>,Tree<Y>,R>
public void setComparator(@NonNull Comparator<Tree<X>,Tree<Y>> comparator)
AlignmentAlgorithm
setComparator
in interface AlignmentAlgorithm<Tree<X>,Tree<Y>,R>
comparator
- the comparator that is used to compute local distances for this Algorithm.public R calculateAlignment(@NonNull List<Tree<X>> X, @NonNull List<Tree<Y>> Y)
AlignmentAlgorithm
calculateAlignment
in interface AlignmentAlgorithm<Tree<X>,Tree<Y>,R>
X
- The left input sequence.Y
- The right input sequence.public abstract R transformToResult(double[][] rep, double[] del, double[] ins, @NonNull List<Tree<X>> X, @NonNull List<Tree<Y>> Y)
rep
- the pairwise edit distance costs.del
- the deletion costs for all trees in the left forest.ins
- the insertion costs for all trees in the right forest.X
- the left input forest.Y
- the right input forest.public final boolean requires(OperationType type)
AlignmentAlgorithm
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/