Package pal.distance
Class PairwiseDistance
- java.lang.Object
-
- pal.distance.PairwiseDistance
-
- All Implemented Interfaces:
java.io.Serializable
public class PairwiseDistance extends java.lang.Object implements java.io.Serializable
determines the (observed and ML) distance between a pair of sequences- Version:
- $Id: PairwiseDistance.java,v 1.10 2002/09/08 03:47:01 matt Exp $
- Author:
- Korbinian Strimmer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description double
distance
last estimated distancedouble
distanceSE
last estimate standard error of a distance
-
Constructor Summary
Constructors Constructor Description PairwiseDistance(SitePattern sp)
Constructor 1 (estimate observed distances only)PairwiseDistance(SitePattern sp, SubstitutionModel m)
Constructor 2 (uses evolutionary model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getDistance(byte[] s1, byte[] s2)
compute distance between two sequences (not necessarly in the given alignment but with the same weights in the site pattern)double
getDistance(int s1, int s2)
compute distance between two sequences in the given alignmentvoid
updateModel(SubstitutionModel m)
update model of substitutionvoid
updateSitePattern(SitePattern sp)
update site pattern
-
-
-
Constructor Detail
-
PairwiseDistance
public PairwiseDistance(SitePattern sp)
Constructor 1 (estimate observed distances only)- Parameters:
sp
- site pattern
-
PairwiseDistance
public PairwiseDistance(SitePattern sp, SubstitutionModel m)
Constructor 2 (uses evolutionary model)- Parameters:
sp
- site patternm
- evolutionary model
-
-
Method Detail
-
updateModel
public void updateModel(SubstitutionModel m)
update model of substitution- Parameters:
model
- of substitution
-
updateSitePattern
public void updateSitePattern(SitePattern sp)
update site pattern- Parameters:
site
- pattern
-
getDistance
public double getDistance(int s1, int s2)
compute distance between two sequences in the given alignment- Parameters:
s1
- number of first sequences2
- number of second sequence- Returns:
- estimated distance (observed or ML, depending on constructor used)
-
getDistance
public double getDistance(byte[] s1, byte[] s2)
compute distance between two sequences (not necessarly in the given alignment but with the same weights in the site pattern)- Parameters:
s1
- site pattern of first sequences2
- site pattern of second sequence- Returns:
- estimated distance (observed or ML, depending on constructor used)
-
-