public class Calculator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Calculator.SiteCalculator
Calculates the likelihood of a single site.
|
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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
|
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 constraintspublic Likelihood calculate(Parameters p) throws TreeException, RateCategory.RateException, Model.ModelException, Parameters.ParameterException
p
- The parameters to be used in the calculationTreeException
- 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