de.citec.tcs.alignment.AlignmentAlgorithm Maven / Gradle / Ivy
/*
* TCS Alignment Toolbox
*
* Copyright (C) 2013-2015
* Benjamin Paaßen, Georg Zentgraf
* AG Theoretical Computer Science
* Centre of Excellence Cognitive Interaction Technology (CITEC)
* University of Bielefeld
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package de.citec.tcs.alignment;
import de.citec.tcs.alignment.sequence.Sequence;
/**
* This is the most generic AlignmentAlgorithm interface for all algorithms
* that provide some sort of alignment between two input sequences.
*
* @author Benjamin Paassen - [email protected]
* @param the result class that represents the alignment in some way.
*/
public interface AlignmentAlgorithm {
/**
* This should return the specification that is used for this Algorithm.
*
* @return the specification that is used for this Algorithm.
*/
public AlignmentSpecification getSpecification();
/**
* This calculates the alignment between the Sequences a and b and returns
* it as an instance of the result class for this algorithm.
*
* Specific parameters should be set either in the AlignmentSpecification or
* in the Algorithm itself.
*
* Furthermore, this implementation should garantuee that
* - A symmetric scoring scheme in the comparators leads to symmetric
* distances, meaning that calculateAlignment(a,b) =
* calculateAlignment(b,a)
* - The replacement cost between two nodes a_i and b_j is defined as the
* weighted sum over all comparator distances.
* - The self distance calculateAlignment(a,a) is scored with
* approximately 0.
* - The worst possible distance is 1.
*
* @param a The first sequence.
* @param b The second sequence.
*
* @return An alignment of a and b in terms of the given result class.
*/
public R calculateAlignment(Sequence a, Sequence b);
/**
* This method shall return the class of the alignment result.
*
* @return the class of the alignment result.
*/
public Class getResultClass();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy