public class Probabilities
extends java.lang.Object
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 set of all possible states
|
double |
getFreq(RateCategory r,
java.lang.String state)
Gets the root frequency for a specified state under a specified RateClass
|
double |
getP(RateCategory r,
Branch b,
java.lang.String startState,
java.lang.String endState)
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 probailities for
|
double |
getRateP(RateCategory r)
Gets the probability of a rate class
|
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 requied parameter is not present)public java.util.Set<RateCategory> getRateCategory()
public java.util.Set<java.lang.String> getAllStates()
public double getP(RateCategory r, Branch b, java.lang.String startState, java.lang.String endState)
r
- The rate classb
- The branchstartState
- The start stateendState
- The end statepublic double getFreq(RateCategory r, java.lang.String state)
r
- The rate classstate
- The statepublic double getRateP(RateCategory r)
r
- the rate class