edu.rit.compbio.phyl
Class HammingDistance
- java.lang.Object
-
- edu.rit.compbio.phyl.HammingDistance
-
- All Implemented Interfaces:
- Distance
public class HammingDistance extends java.lang.Object implements Distance
Class HammingDistance provides an object that computes the Hamming distance between two DnaSequences. The Hamming distance is the number of positions at which the sequences differ.
-
-
Constructor Summary
Constructors Constructor and Description HammingDistance()Construct a new Hamming distance object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubledistance(DnaSequence seq1, DnaSequence seq2)Compute the distance between the two given DNA sequences.
-
-
-
Constructor Detail
-
HammingDistance
public HammingDistance()
Construct a new Hamming distance object.
-
-
Method Detail
-
distance
public double distance(DnaSequence seq1, DnaSequence seq2)
Compute the distance between the two given DNA sequences. It is assumed that the DNA sequences are the same length.
-
-
DMelt 3.0 © DataMelt by jWork.ORG