public class Probabilities
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Probabilities.RateProbabilities
Stores the values of each transition, frequency etc for one set of parameters
and for a single rate category.
|
Constructor and Description |
---|
Probabilities(Model m,
Tree t,
Parameters p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getAllStates()
Gets the list of all possible states
|
java.util.Map<java.lang.String,java.lang.Integer> |
getMap()
Gets an Map linking states to position in an array
|
Probabilities.RateProbabilities |
getP(RateCategory r)
Gets a specific probability for a change from one state to another along
a specific branch under a specific RateClass
|
java.util.Set<RateCategory> |
getRateCategory()
Gets the set of RateClasses that we have calculated probabilities for
|
double |
getRateP(RateCategory r)
Gets the probability of a rate class
|
Root |
getRoot(RateCategory r)
Get a root object, for the given rate category, that can be used to
the total likelihood from the root node likelihoods or provide the
frequencies of the various states at the root
|
public Probabilities(Model m, Tree t, Parameters p) throws TreeException, RateCategory.RateException, Model.ModelException, Parameters.ParameterException
m
- The modelt
- The treep
- The parametersTreeException
- Thrown if there is a problem with the tree.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 required parameter is not present)public java.util.Set<RateCategory> getRateCategory()
public java.util.Set<java.lang.String> getAllStates()
public Probabilities.RateProbabilities getP(RateCategory r)
r
- The rate classpublic Root getRoot(RateCategory r)
r
- The rate category to get the root object forpublic double getRateP(RateCategory r)
r
- the rate classpublic java.util.Map<java.lang.String,java.lang.Integer> getMap()