Documentation of 'edu.rit.compbio.phyl.HammingDistance' Java class
HammingDistance
edu.rit.compbio.phyl

Class 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
      double distance(DnaSequence seq1, DnaSequence seq2)
      Compute the distance between the two given DNA sequences.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
        Specified by:
        distance in interface Distance
        Parameters:
        seq1 - First DNA sequence.
        seq2 - Second DNA sequence.
        Returns:
        Distance.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.