Package pal.treesearch
Class FixedBSRDTGlobalClockModel
- java.lang.Object
-
- pal.treesearch.FixedBSRDTGlobalClockModel
-
- All Implemented Interfaces:
MolecularClockLikelihoodModel.HeightConverter
,NeoParameterized
,ConstraintModel
,ConstraintModel.GroupManager
public class FixedBSRDTGlobalClockModel extends java.lang.Object implements ConstraintModel, ConstraintModel.GroupManager, NeoParameterized, MolecularClockLikelihoodModel.HeightConverter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface pal.treesearch.ConstraintModel
ConstraintModel.GroupManager
-
-
Constructor Summary
Constructors Constructor Description FixedBSRDTGlobalClockModel(SampleInformation sampleInformation, MolecularClockLikelihoodModel.Instance likelihoodModel, double rate)
-
Method Summary
-
-
-
Constructor Detail
-
FixedBSRDTGlobalClockModel
public FixedBSRDTGlobalClockModel(SampleInformation sampleInformation, MolecularClockLikelihoodModel.Instance likelihoodModel, double rate)
-
-
Method Detail
-
getRateModelSummary
public java.lang.String getRateModelSummary()
- Specified by:
getRateModelSummary
in interfaceConstraintModel
-
getGlobalClockConstraintGrouping
public ConstraintModel.GroupManager getGlobalClockConstraintGrouping(java.lang.String[] leafLabelSet)
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
public java.lang.String[][] getCladeConstraints(java.lang.String[] allLabelSet)
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
public UnconstrainedLikelihoodModel.External createNewFreeExternal()
- Specified by:
createNewFreeExternal
in interfaceConstraintModel
-
createNewFreeInternal
public UnconstrainedLikelihoodModel.Internal createNewFreeInternal()
- Specified by:
createNewFreeInternal
in interfaceConstraintModel
-
createAppropriateConditionalProbabilityStore
public ConditionalProbabilityStore createAppropriateConditionalProbabilityStore(boolean isForLeaf)
- Specified by:
createAppropriateConditionalProbabilityStore
in interfaceConstraintModel
-
getSubstitutionRate
public double getSubstitutionRate()
-
getGlobalParameterAccess
public NeoParameterized getGlobalParameterAccess()
- Specified by:
getGlobalParameterAccess
in interfaceConstraintModel
-
getLeafBaseHeight
public double getLeafBaseHeight(java.lang.String leafLabel)
- 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
public void initialiseParameters(java.lang.String[] leafNames, double[] leafHeights)
- Specified by:
initialiseParameters
in interfaceConstraintModel.GroupManager
-
getAllGroupRelatedParameterAccess
public NeoParameterized getAllGroupRelatedParameterAccess()
- Specified by:
getAllGroupRelatedParameterAccess
in interfaceConstraintModel.GroupManager
-
getPrimaryGroupRelatedParameterAccess
public NeoParameterized getPrimaryGroupRelatedParameterAccess()
- Specified by:
getPrimaryGroupRelatedParameterAccess
in interfaceConstraintModel.GroupManager
-
getSecondaryGroupRelatedParameterAccess
public NeoParameterized getSecondaryGroupRelatedParameterAccess()
- Specified by:
getSecondaryGroupRelatedParameterAccess
in interfaceConstraintModel.GroupManager
-
createNewClockLeaf
public MolecularClockLikelihoodModel.Leaf createNewClockLeaf(PatternInfo pattern, int[] patternStateMatchup)
- Specified by:
createNewClockLeaf
in interfaceConstraintModel.GroupManager
-
createNewClockExternal
public MolecularClockLikelihoodModel.External createNewClockExternal()
- Specified by:
createNewClockExternal
in interfaceConstraintModel.GroupManager
-
createNewClockInternal
public MolecularClockLikelihoodModel.Internal 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
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
-
-