Package pal.distance
Class SequencePairLikelihood
- java.lang.Object
-
- pal.distance.SequencePairLikelihood
-
- All Implemented Interfaces:
java.io.Serializable
,UnivariateFunction
public class SequencePairLikelihood extends java.lang.Object implements UnivariateFunction, java.io.Serializable
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SequencePairLikelihood(SitePattern sp, SubstitutionModel m)
initialisation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluate(double arc)
compute function valuedouble
getLowerBound()
get lower bound of argumentdouble
getUpperBound()
get upper bound of argumentvoid
setSequences(byte[] s1, byte[] s2)
specification of two sequences (not necessarily in the given alignment but with the same weights in the site pattern)void
setSequences(int s1, int s2)
specification of two sequences in the given alignmentvoid
updateModel(SubstitutionModel m)
update model of substitutionvoid
updateSitePattern(SitePattern sp)
update site pattern
-
-
-
Constructor Detail
-
SequencePairLikelihood
public SequencePairLikelihood(SitePattern sp, SubstitutionModel m)
initialisation- Parameters:
sp
- site patternm
- model of substitution
-
-
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
-
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:UnivariateFunction
compute function value- Specified by:
evaluate
in interfaceUnivariateFunction
- Returns:
- function value
-
getLowerBound
public double getLowerBound()
Description copied from interface:UnivariateFunction
get lower bound of argument- Specified by:
getLowerBound
in interfaceUnivariateFunction
- Returns:
- lower bound
-
getUpperBound
public double getUpperBound()
Description copied from interface:UnivariateFunction
get upper bound of argument- Specified by:
getUpperBound
in interfaceUnivariateFunction
- Returns:
- upper bound
-
-