pal.coalescent
Class DemographicClockTree

java.lang.Object
  |
  +--pal.tree.ParameterizedTree
        |
        +--pal.tree.ClockTree
              |
              +--pal.coalescent.DemographicClockTree
All Implemented Interfaces:
DemographicTree, Parameterized, java.io.Serializable, Tree, Units

public class DemographicClockTree
extends ClockTree
implements DemographicTree

Provides parameter interface to a clock-like genealogy which is assumed to have some demographic pattern of theta (diversity) as well as branch parameters (the minimal node height differences at each internal node). Must be used in conjunction with DemographicLikelihoodFunction!

See Also:
Serialized Form

Fields inherited from class pal.tree.ClockTree
parameter
 
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, YEARS
 
Constructor Summary
DemographicClockTree(Tree t, DemographicModel model)
          take any tree and afford it with an interface suitable for a clock-like genealogy, under a certain demographic assumption.
 
Method Summary
 double computeDemoLogLikelihood()
          Returns the likelihood of the current demographic model, given the current branch lengths.
 DemographicModel getDemographicModel()
          Return the demographic model being used to optimize the likelihood of this tree.
 int getNumParameters()
          get number of parameters
protected  void heights2parameters()
           
protected  void parameters2Heights()
           
 
Methods inherited from class pal.tree.ClockTree
getDefaultValue, getLowerLimit, getParameter, getUpperLimit, setParameter, setParameterSE, update
 
Methods inherited from class pal.tree.ParameterizedTree
createNodeList, getAttribute, getBaseTree, getExternalNode, getExternalNodeCount, getInternalNode, getInternalNodeCount, getRoot, getUnits, setAttribute, setBaseTree, setRoot, setUnits, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DemographicClockTree

public DemographicClockTree(Tree t,
                            DemographicModel model)
take any tree and afford it with an interface suitable for a clock-like genealogy, under a certain demographic assumption.

This parameterisation of branches, ensuring that all parameters are independent of each other is due to Andrew Rambaut (personal communication).

Method Detail

computeDemoLogLikelihood

public double computeDemoLogLikelihood()
Returns the likelihood of the current demographic model, given the current branch lengths.
Specified by:
computeDemoLogLikelihood in interface DemographicTree

getNumParameters

public int getNumParameters()
Description copied from interface: Parameterized
get number of parameters
Overrides:
getNumParameters in class ClockTree
Following copied from interface: pal.misc.Parameterized
Returns:
number of parameters

parameters2Heights

protected void parameters2Heights()
Overrides:
parameters2Heights in class ClockTree

heights2parameters

protected void heights2parameters()
Overrides:
heights2parameters in class ClockTree

getDemographicModel

public DemographicModel getDemographicModel()
Return the demographic model being used to optimize the likelihood of this tree.
Specified by:
getDemographicModel in interface DemographicTree