mobios.dist
Class SymmetricSubstitutionWeightMatrix
java.lang.Object
mobios.dist.SymmetricSubstitutionWeightMatrix
- All Implemented Interfaces:
- Serializable, WeightMatrix
public class SymmetricSubstitutionWeightMatrix
- extends Object
- implements WeightMatrix
Implements a WeightMatrix by providing a symmetric substitution matrix of double
distances for a given Alphabet. Thus, this class defines a weighted edit distance on an
Alphabet.
- Version:
- 2004.03.02
- Author:
- Rui Mao, Willard
- See Also:
- Serialized Form
SymmetricSubstitutionWeightMatrix
public SymmetricSubstitutionWeightMatrix(Alphabet alphabet,
double[][] distances)
- Constructor.
- Parameters:
alphabet - the Alphabet that this SymmetricSubstitionWeightMatrix is defined over.distances - a two-dimensional array of double distances between the Symbol objects of the
alphabet.
getDistance
public double getDistance(Symbol one,
Symbol two)
- Specified by:
getDistance in interface WeightMatrix
- Returns:
- the distance between two
Symbol objects in the Alphabet over which
this matrix is defined.
getAlphabet
public Alphabet getAlphabet()
- Specified by:
getAlphabet in interface WeightMatrix
- Returns:
- the
Alphabet over which this matrix is defined.
(C) 2002 - 2006 The MoBIoS Group