Package pal.substmodel
Class VariableIndependentSingleSplitDistribution
- java.lang.Object
-
- pal.substmodel.VariableIndependentSingleSplitDistribution
-
- All Implemented Interfaces:
NeoParameterized
,SingleSplitDistribution
public class VariableIndependentSingleSplitDistribution extends java.lang.Object implements SingleSplitDistribution
Title: VariableIndependentSingleSplitDistribution
Description: Allows for a split in substitution model parameters where the class distribution before the split maybe different after the split (and the probabilities of being in a before class and an after class are independent)
- Author:
- Matthew Goode
-
-
Constructor Summary
Constructors Constructor Description VariableIndependentSingleSplitDistribution(int numberOfBaseTransitionCategories)
VariableIndependentSingleSplitDistribution(int numberOfBaseTransitionCategories, double[] initialParameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
getDefaultValues(double[] store, int startIndex)
get default value parameter valuesdouble[]
getDistribution()
double[][]
getDistributionInfo()
Obtain the distribution information stored in the following format: [beforeclass][afterclass] For example, the probability of evolving in class 0 before the split, and class 1 after the split - [0][1]double
getLowerLimit(int n)
get lower parameter limitint
getNumberOfBaseTransitionCategories()
int
getNumberOfParameters()
get number of parametersvoid
getParameters(double[] store, int startIndex)
get model parameterdouble
getUpperLimit(int n)
get upper parameter limitvoid
setParameters(double[] store, int startIndex)
set model parameterjava.lang.String
toString()
-
-
-
Constructor Detail
-
VariableIndependentSingleSplitDistribution
public VariableIndependentSingleSplitDistribution(int numberOfBaseTransitionCategories)
-
VariableIndependentSingleSplitDistribution
public VariableIndependentSingleSplitDistribution(int numberOfBaseTransitionCategories, double[] initialParameters)
-
-
Method Detail
-
getDistribution
public double[] getDistribution()
-
getNumberOfBaseTransitionCategories
public int getNumberOfBaseTransitionCategories()
- Specified by:
getNumberOfBaseTransitionCategories
in interfaceSingleSplitDistribution
-
getDistributionInfo
public double[][] getDistributionInfo()
Description copied from interface:SingleSplitDistribution
Obtain the distribution information stored in the following format: [beforeclass][afterclass] For example, the probability of evolving in class 0 before the split, and class 1 after the split - [0][1]- Specified by:
getDistributionInfo
in interfaceSingleSplitDistribution
- Returns:
- an appropriate matrix representing the probability of evolving in the different combinations of before and after classes
-
getNumberOfParameters
public int getNumberOfParameters()
Description copied from interface:NeoParameterized
get number of parameters- Specified by:
getNumberOfParameters
in interfaceNeoParameterized
- Returns:
- number of parameters
-
setParameters
public void setParameters(double[] store, int startIndex)
Description copied from interface:NeoParameterized
set model parameter- Specified by:
setParameters
in interfaceNeoParameterized
- Parameters:
store
- the array holding the parametersstartIndex
- the index into the array that the related parameters start at
-
getParameters
public void getParameters(double[] store, int startIndex)
Description copied from interface:NeoParameterized
get model parameter- Specified by:
getParameters
in interfaceNeoParameterized
startIndex
- the index into the array that the related parameters start at
-
getLowerLimit
public double getLowerLimit(int n)
Description copied from interface:NeoParameterized
get lower parameter limit- Specified by:
getLowerLimit
in interfaceNeoParameterized
- Parameters:
n
- parameter number- Returns:
- lower bound
-
getUpperLimit
public double getUpperLimit(int n)
Description copied from interface:NeoParameterized
get upper parameter limit- Specified by:
getUpperLimit
in interfaceNeoParameterized
- Parameters:
n
- parameter number- Returns:
- upper bound
-
getDefaultValues
public void getDefaultValues(double[] store, int startIndex)
Description copied from interface:NeoParameterized
get default value parameter values- Specified by:
getDefaultValues
in interfaceNeoParameterized
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-