X
- the class of the elements in the left input sequence.Y
- the class of the elements in the right input sequence.N
- the enum listing the nonterminal symbols for the input grammar.public class SoftADPFullAlgorithm<X,Y,N extends Enum<N>> extends AbstractADPAlgorithm<X,Y,SoftADPPathModel,N>
Constructor and Description |
---|
SoftADPFullAlgorithm(Grammar<N> grammar,
Comparator<X,Y> comparator)
Creates a new SoftFullAlgorithm based on the given ADP grammar
and the given Comparator/algebra.
|
Modifier and Type | Method and Description |
---|---|
double |
choice(double[] choices)
This should implement the choice function as the term is used
in the Bellman's Gap context.
|
SoftADPPathModel |
transformToResult(EnumMap<N,double[][]> dpTables,
EnumMap<OperationType,double[][]> repMatrices,
EnumMap<OperationType,double[]> delVectors,
EnumMap<OperationType,double[]> insVectors,
List<X> a,
List<Y> b)
This method should not be called from outside!
The subclass uses this method to transform the alignment matrix and the
input sequences to the actual alignment result.
|
calculateAlignment, getComparator, getResultClass, normalizeDissimilarity, requires, setComparator
public SoftADPFullAlgorithm(@NonNull Grammar<N> grammar, @NonNull Comparator<X,Y> comparator)
grammar
- and ADP grammar.comparator
- a Comparator.public double choice(@NonNull double[] choices)
AbstractADPAlgorithm
choice
in class AbstractADPAlgorithm<X,Y,SoftADPPathModel,N extends Enum<N>>
choices
- the costs of all choices.public SoftADPPathModel transformToResult(@NonNull EnumMap<N,double[][]> dpTables, @NonNull EnumMap<OperationType,double[][]> repMatrices, @NonNull EnumMap<OperationType,double[]> delVectors, @NonNull EnumMap<OperationType,double[]> insVectors, @NonNull List<X> a, @NonNull List<Y> b)
AbstractADPAlgorithm
transformToResult
in class AbstractADPAlgorithm<X,Y,SoftADPPathModel,N extends Enum<N>>
dpTables
- the dynamic programming matrices used during
calculation.repMatrices
- the local cost for replacing node i from the first
sequence with node j from the second sequence.delVectors
- the local cost for deleting node i from the first
sequence.insVectors
- the local cost for inserting node j from the
second sequence into the first sequence.a
- the first sequence.b
- th second sequence.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/