Package pal.treesearch
Class GlobalClockModel
java.lang.Object
pal.treesearch.GlobalClockModel
- All Implemented Interfaces:
MolecularClockLikelihoodModel.HeightConverter
,NeoParameterized
,ConstraintModel
,ConstraintModel.GroupManager
public class GlobalClockModel
extends Object
implements ConstraintModel, ConstraintModel.GroupManager, MolecularClockLikelihoodModel.HeightConverter, NeoParameterized
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.treesearch.ConstraintModel
ConstraintModel.GroupManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAppropriateConditionalProbabilityStore
(boolean isForLeaf) createNewClockLeaf
(PatternInfo pattern, int[] patternStateMatchup) createNewFreeLeaf
(int[] patternStateMatchup, int numberOfPatterns) double
getBaseHeight
(double originalExpectSubstitutionHeight) int
String[][]
getCladeConstraints
(String[] allLabelSet) Obtain the permanent clade sets.void
getDefaultValues
(double[] store, int startIndex) get default value parameter valuesdouble
getExpectedSubstitutionDistance
(double lowerBaseHeight, double upperBaseHeight) double
getExpectedSubstitutionHeight
(double baseHeight) getGlobalClockConstraintGrouping
(String[] leafLabelSet) Enquire about the clock constraint grouping of the leafdouble
getLeafBaseHeight
(String leafLabel) double
getLowerLimit
(int n) get lower parameter limitint
get number of parametersvoid
getParameters
(double[] store, int startIndex) get model parameterdouble
getUpperLimit
(int n) get upper parameter limitvoid
initialiseParameters
(String[] leafNames, double[] leafHeights) void
setParameters
(double[] parameters, int startIndex) set model parameter
-
Constructor Details
-
GlobalClockModel
-
-
Method Details
-
getRateModelSummary
- Specified by:
getRateModelSummary
in interfaceConstraintModel
-
getGlobalClockConstraintGrouping
Description copied from interface:ConstraintModel
Enquire about the clock constraint grouping of the leaf- Specified by:
getGlobalClockConstraintGrouping
in interfaceConstraintModel
- Returns:
- the grouping of the leaf, or null if outside the leaf is unconstrained (free)
-
getCladeConstraints
Description copied from interface:ConstraintModel
Obtain the permanent clade sets. That is, when randomly building the tree, and when tree searching, what labels must always form a clade.- Specified by:
getCladeConstraints
in interfaceConstraintModel
- Parameters:
allLabelSet
- The set of all leaf labels in the tree- Returns:
- An array of string arrays dividing up the label set
-
createNewFreeLeaf
public UnconstrainedLikelihoodModel.Leaf createNewFreeLeaf(int[] patternStateMatchup, int numberOfPatterns) - Specified by:
createNewFreeLeaf
in interfaceConstraintModel
-
createNewFreeExternal
- Specified by:
createNewFreeExternal
in interfaceConstraintModel
-
createNewFreeInternal
- Specified by:
createNewFreeInternal
in interfaceConstraintModel
-
createAppropriateConditionalProbabilityStore
- Specified by:
createAppropriateConditionalProbabilityStore
in interfaceConstraintModel
-
getGlobalParameterAccess
- Specified by:
getGlobalParameterAccess
in interfaceConstraintModel
-
getLeafBaseHeight
- Specified by:
getLeafBaseHeight
in interfaceConstraintModel.GroupManager
-
getBaseHeight
public double getBaseHeight(double originalExpectSubstitutionHeight) - Specified by:
getBaseHeight
in interfaceConstraintModel.GroupManager
-
getBaseHeightUnits
public int getBaseHeightUnits()- Specified by:
getBaseHeightUnits
in interfaceConstraintModel.GroupManager
-
initialiseParameters
- Specified by:
initialiseParameters
in interfaceConstraintModel.GroupManager
-
getAllGroupRelatedParameterAccess
- Specified by:
getAllGroupRelatedParameterAccess
in interfaceConstraintModel.GroupManager
-
getPrimaryGroupRelatedParameterAccess
- Specified by:
getPrimaryGroupRelatedParameterAccess
in interfaceConstraintModel.GroupManager
-
getSecondaryGroupRelatedParameterAccess
- Specified by:
getSecondaryGroupRelatedParameterAccess
in interfaceConstraintModel.GroupManager
-
createNewClockLeaf
public MolecularClockLikelihoodModel.Leaf createNewClockLeaf(PatternInfo pattern, int[] patternStateMatchup) - Specified by:
createNewClockLeaf
in interfaceConstraintModel.GroupManager
-
createNewClockExternal
- Specified by:
createNewClockExternal
in interfaceConstraintModel.GroupManager
-
createNewClockInternal
- Specified by:
createNewClockInternal
in interfaceConstraintModel.GroupManager
-
getExpectedSubstitutionHeight
public double getExpectedSubstitutionHeight(double baseHeight) - Specified by:
getExpectedSubstitutionHeight
in interfaceConstraintModel.GroupManager
- Specified by:
getExpectedSubstitutionHeight
in interfaceMolecularClockLikelihoodModel.HeightConverter
-
getExpectedSubstitutionDistance
public double getExpectedSubstitutionDistance(double lowerBaseHeight, double upperBaseHeight) - Specified by:
getExpectedSubstitutionDistance
in interfaceMolecularClockLikelihoodModel.HeightConverter
-
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[] parameters, int startIndex) Description copied from interface:NeoParameterized
set model parameter- Specified by:
setParameters
in interfaceNeoParameterized
- Parameters:
parameters
- 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
- Parameters:
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
-