|
||||||||||
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(java.util.Map<java.lang.String,Model> m,
Alignment a,
Tree t)
Creates a class to calculate the likelihood for a given set of models, an alignment, and a tree. |
|
Calculator(java.util.Map<java.lang.String,Model> m,
Alignment a,
Tree t,
Alignment unobserved)
Creates a class to calculate the likelihood for a given set of models, an alignment, a tree, and unobserved data. |
|
Calculator(java.util.Map<java.lang.String,Model> m,
Alignment a,
Tree t,
Alignment unobserved,
java.util.Map<java.lang.String,Constrainer> con)
Creates a class to calculate the likelihood for a given set of models, an alignment, a tree, unobserved data and a set of constraints. |
|
Calculator(java.util.Map<java.lang.String,Model> m,
Alignment a,
Tree t,
java.util.Map<java.lang.String,Constrainer> con)
Creates a class to calculate the likelihood for a given set of models, an alignment, a tree and a set of constraints. |
|
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) throws TreeException
m
- The modela
- The alignmentt
- The tree
TreeException
- If there is a problem with the treepublic Calculator(Model m, Alignment a, Tree t, Alignment unobserved) throws TreeException
m
- The modela
- The alignmentt
- The treeunobserved
- Unobserved data given as another alignment
TreeException
- If there is a problem with the treepublic Calculator(Model m, Alignment a, Tree t, Constrainer con) throws TreeException
m
- The modela
- The alignmentt
- The treecon
- Any constraints
TreeException
- If there is a problem with the treepublic Calculator(Model m, Alignment a, Tree t, Alignment unobserved, Constrainer con) throws TreeException
m
- The modela
- The alignmentt
- The treeunobserved
- Unobserved data given as another alignmentcon
- Any constraints
TreeException
- If there is a problem with the treepublic Calculator(java.util.Map<java.lang.String,Model> m, Alignment a, Tree t) throws AlignmentException, TreeException
m
- Map from site class to modela
- The alignmentt
- The tree
AlignmentException
- Thrown if a model isn't given for each site class
in the alignment
TreeException
- If there is a problem with the treepublic Calculator(java.util.Map<java.lang.String,Model> m, Alignment a, Tree t, Alignment unobserved) throws AlignmentException, TreeException
m
- Map from site class to modela
- The alignmentt
- The treeunobserved
- Unobserved data given as another alignment
AlignmentException
- Thrown if a model isn't given for each site class
in the alignment
TreeException
- If there is a problem with the treepublic Calculator(java.util.Map<java.lang.String,Model> m, Alignment a, Tree t, java.util.Map<java.lang.String,Constrainer> con) throws AlignmentException, TreeException
m
- Map from site class to modela
- The alignmentt
- The treecon
- Map from site class to constrainer
AlignmentException
- Thrown if a model and constrainer isn't given
for each site class in the alignment
TreeException
- If there is a problem with the treepublic Calculator(java.util.Map<java.lang.String,Model> m, Alignment a, Tree t, Alignment unobserved, java.util.Map<java.lang.String,Constrainer> con) throws AlignmentException, TreeException
m
- Map from site class to modela
- The alignmentt
- The treeunobserved
- Unobserved data given as another alignmentcon
- Map from site class to constrainer
AlignmentException
- Thrown if a model and constrainer isn't given
for each site class in the alignment
TreeException
- If there is a problem with the treeMethod 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 |