pal.treesearch
Class FixedSRDTGlobalClockModel

java.lang.Object
  extended by pal.treesearch.FixedSRDTGlobalClockModel
All Implemented Interfaces:
MolecularClockLikelihoodModel.HeightConverter, ConstraintModel, ConstraintModel.GroupManager

public class FixedSRDTGlobalClockModel
extends java.lang.Object
implements ConstraintModel, ConstraintModel.GroupManager, MolecularClockLikelihoodModel.HeightConverter


Nested Class Summary
 
Nested classes/interfaces inherited from interface pal.treesearch.ConstraintModel
ConstraintModel.GroupManager
 
Constructor Summary
FixedSRDTGlobalClockModel(SampleInformation sampleInformation, MolecularClockLikelihoodModel.Instance likelihoodModel, double rate)
           
 
Method Summary
 ConditionalProbabilityStore createAppropriateConditionalProbabilityStore(boolean isForLeaf)
           
 MolecularClockLikelihoodModel.External createNewClockExternal()
           
 MolecularClockLikelihoodModel.Internal createNewClockInternal()
           
 MolecularClockLikelihoodModel.Leaf createNewClockLeaf(PatternInfo pattern, int[] patternStateMatchup)
           
 UnconstrainedLikelihoodModel.External createNewFreeExternal()
           
 UnconstrainedLikelihoodModel.Internal createNewFreeInternal()
           
 UnconstrainedLikelihoodModel.Leaf createNewFreeLeaf(int[] patternStateMatchup, int numberOfPatterns)
           
 NeoParameterized getAllGroupRelatedParameterAccess()
           
 double getBaseHeight(double originalExpectSubstitutionHeight)
           
 int getBaseHeightUnits()
           
 java.lang.String[][] getCladeConstraints(java.lang.String[] allLabelSet)
          Obtain the permanent clade sets.
 double getExpectedSubstitutionDistance(double lowerBaseHeight, double upperBaseHeight)
           
 double getExpectedSubstitutionHeight(double baseHeight)
           
 ConstraintModel.GroupManager getGlobalClockConstraintGrouping(java.lang.String[] leafLabelSet)
          Enquire about the clock constraint grouping of the leaf
 NeoParameterized getGlobalParameterAccess()
           
 double getLeafBaseHeight(java.lang.String leafLabel)
           
 NeoParameterized getPrimaryGroupRelatedParameterAccess()
           
 java.lang.String getRateModelSummary()
           
 NeoParameterized getSecondaryGroupRelatedParameterAccess()
           
 double getSubstitutionRate()
           
 void initialiseParameters(java.lang.String[] leafNames, double[] leafHeights)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedSRDTGlobalClockModel

public FixedSRDTGlobalClockModel(SampleInformation sampleInformation,
                                 MolecularClockLikelihoodModel.Instance likelihoodModel,
                                 double rate)
Method Detail

getRateModelSummary

public java.lang.String getRateModelSummary()
Specified by:
getRateModelSummary in interface ConstraintModel

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 interface ConstraintModel
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 interface ConstraintModel
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 interface ConstraintModel

createNewFreeExternal

public UnconstrainedLikelihoodModel.External createNewFreeExternal()
Specified by:
createNewFreeExternal in interface ConstraintModel

createNewFreeInternal

public UnconstrainedLikelihoodModel.Internal createNewFreeInternal()
Specified by:
createNewFreeInternal in interface ConstraintModel

createAppropriateConditionalProbabilityStore

public ConditionalProbabilityStore createAppropriateConditionalProbabilityStore(boolean isForLeaf)
Specified by:
createAppropriateConditionalProbabilityStore in interface ConstraintModel

getSubstitutionRate

public double getSubstitutionRate()

getGlobalParameterAccess

public NeoParameterized getGlobalParameterAccess()
Specified by:
getGlobalParameterAccess in interface ConstraintModel

getLeafBaseHeight

public double getLeafBaseHeight(java.lang.String leafLabel)
Specified by:
getLeafBaseHeight in interface ConstraintModel.GroupManager

getBaseHeight

public double getBaseHeight(double originalExpectSubstitutionHeight)
Specified by:
getBaseHeight in interface ConstraintModel.GroupManager

getBaseHeightUnits

public int getBaseHeightUnits()
Specified by:
getBaseHeightUnits in interface ConstraintModel.GroupManager

initialiseParameters

public void initialiseParameters(java.lang.String[] leafNames,
                                 double[] leafHeights)
Specified by:
initialiseParameters in interface ConstraintModel.GroupManager

getAllGroupRelatedParameterAccess

public NeoParameterized getAllGroupRelatedParameterAccess()
Specified by:
getAllGroupRelatedParameterAccess in interface ConstraintModel.GroupManager

getPrimaryGroupRelatedParameterAccess

public NeoParameterized getPrimaryGroupRelatedParameterAccess()
Specified by:
getPrimaryGroupRelatedParameterAccess in interface ConstraintModel.GroupManager

getSecondaryGroupRelatedParameterAccess

public NeoParameterized getSecondaryGroupRelatedParameterAccess()
Specified by:
getSecondaryGroupRelatedParameterAccess in interface ConstraintModel.GroupManager

createNewClockLeaf

public MolecularClockLikelihoodModel.Leaf createNewClockLeaf(PatternInfo pattern,
                                                             int[] patternStateMatchup)
Specified by:
createNewClockLeaf in interface ConstraintModel.GroupManager

createNewClockExternal

public MolecularClockLikelihoodModel.External createNewClockExternal()
Specified by:
createNewClockExternal in interface ConstraintModel.GroupManager

createNewClockInternal

public MolecularClockLikelihoodModel.Internal createNewClockInternal()
Specified by:
createNewClockInternal in interface ConstraintModel.GroupManager

getExpectedSubstitutionHeight

public double getExpectedSubstitutionHeight(double baseHeight)
Specified by:
getExpectedSubstitutionHeight in interface MolecularClockLikelihoodModel.HeightConverter
Specified by:
getExpectedSubstitutionHeight in interface ConstraintModel.GroupManager

getExpectedSubstitutionDistance

public double getExpectedSubstitutionDistance(double lowerBaseHeight,
                                              double upperBaseHeight)
Specified by:
getExpectedSubstitutionDistance in interface MolecularClockLikelihoodModel.HeightConverter