Package pal.distance
Class SequencePairLikelihood
java.lang.Object
pal.distance.SequencePairLikelihood
- All Implemented Interfaces:
Serializable,UnivariateFunction
computation of the (negative) log-likelihood for a pair of sequences
- Version:
- $Id: SequencePairLikelihood.java,v 1.11 2002/12/05 04:27:28 matt Exp $
- Author:
- Korbinian Strimmer
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal doubleevaluate(double arc) compute function valuedoubleget lower bound of argumentdoubleget upper bound of argumentvoidsetSequences(byte[] s1, byte[] s2) specification of two sequences (not necessarily in the given alignment but with the same weights in the site pattern)voidsetSequences(int s1, int s2) specification of two sequences in the given alignmentvoidupdate model of substitutionvoidupdate site pattern
-
Constructor Details
-
SequencePairLikelihood
initialisation- Parameters:
sp- site patternm- model of substitution
-
-
Method Details
-
updateModel
update model of substitution- Parameters:
model- of substitution
-
updateSitePattern
update site pattern- Parameters:
site- pattern
-
setSequences
public void setSequences(int s1, int s2) specification of two sequences in the given alignment- Parameters:
s1- number of first sequences2- number of second sequence
-
setSequences
public void setSequences(byte[] s1, byte[] s2) specification of two sequences (not necessarily 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
-
evaluate
public final double evaluate(double arc) Description copied from interface:UnivariateFunctioncompute function value- Specified by:
evaluatein interfaceUnivariateFunction- Returns:
- function value
-
getLowerBound
public double getLowerBound()Description copied from interface:UnivariateFunctionget lower bound of argument- Specified by:
getLowerBoundin interfaceUnivariateFunction- Returns:
- lower bound
-
getUpperBound
public double getUpperBound()Description copied from interface:UnivariateFunctionget upper bound of argument- Specified by:
getUpperBoundin interfaceUnivariateFunction- Returns:
- upper bound
-