Mobios v0.91

mobios.dist
Class SymmetricSubstitutionWeightMatrix

java.lang.Object
  extended by 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

Constructor Summary
SymmetricSubstitutionWeightMatrix(Alphabet alphabet, double[][] distances)
          Constructor.
 
Method Summary
 Alphabet getAlphabet()
           
 double getDistance(Symbol one, Symbol two)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.

Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group