|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLikelihood.Calculator
public class Calculator
Calculates the likelihood for different parameter values. Succesive calls to an instance of this class are used to maximise the parameters values for one case. Uses the pruning technique of Felenstein 1981 and can account for unobserved states using Felsenstein 1992.
Nested Class Summary | |
---|---|
static class |
Calculator.SiteCalculator
Calculates the likelihood of a single site. |
Constructor Summary | |
---|---|
Calculator(Model m,
Alignment a,
Tree t)
Creates an object to calculate the likelihood for a given model, alignment, tree. |
|
Calculator(Model m,
Alignment a,
Tree t,
Alignment unobserved)
Creates a class to calculate the likelihood for a given model, alignment, tree, missing data and constraints |
|
Calculator(Model m,
Alignment a,
Tree t,
Alignment unobserved,
Constrainer con)
Creates a class to calculate the likelihood for a given model, alignment, tree, unobserved data and constraints |
|
Calculator(Model m,
Alignment a,
Tree t,
Constrainer con)
Creates a class to calculate the likelihood for a given model, alignment, tree and constraints |
Method Summary | |
---|---|
Likelihood |
calculate(Parameters p)
Calculates the likelihood for a given set of parameters |
static void |
setNoThreads(int number)
Set the number of threads to be used during the calculations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Calculator(Model m, Alignment a, Tree t)
m
- The modela
- The alignmentt
- The treepublic Calculator(Model m, Alignment a, Tree t, Alignment unobserved)
m
- The modela
- The alignmentt
- The treeunobserved
- Unobserved data given as another alignmentpublic Calculator(Model m, Alignment a, Tree t, Constrainer con)
m
- The modela
- The alignmentt
- The treecon
- Any constraintspublic Calculator(Model m, Alignment a, Tree t, Alignment unobserved, Constrainer con)
m
- The modela
- The alignmentt
- The treeunobserved
- Unobserved data given as another alignmentcon
- Any constraintsMethod Detail |
---|
public Likelihood calculate(Parameters p) throws TreeException, RateCategory.RateException, Model.ModelException, Parameters.ParameterException
p
- The parameters to be used in the calculation
TreeException
- Thrown if there is a problem with the Tree (e.g. if
there is a branch with no length given in parameters)
RateCategory.RateException
- Thrown if there is an issue with
a rate category in the model (e.g. a badly formatted rate).
Model.ModelException
- Thrown if there is a problem with the
model (e.g. the rate categories differ in their states)
Parameters.ParameterException
- Thrown if there is a problem
with the parameters (e.g. a requied parameter is not present)public static void setNoThreads(int number)
number
- Number of threads
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |