Package jebl.evolution.coalescent
Class CataclysmicDemographic
- java.lang.Object
-
- jebl.evolution.coalescent.ConstantPopulation
-
- jebl.evolution.coalescent.ExponentialGrowth
-
- jebl.evolution.coalescent.CataclysmicDemographic
-
- All Implemented Interfaces:
DemographicFunction
public class CataclysmicDemographic extends ExponentialGrowth
This class models an exponentially growing (or shrinking) population (Parameters: N0=present-day population size; r=growth rate). This model is nested with the constant-population size model (r=0).- Version:
- $Id: CataclysmicDemographic.java 586 2006-12-15 15:49:15Z twobeers $
- Author:
- Alexei Drummond, Andrew Rambaut
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jebl.evolution.coalescent.DemographicFunction
DemographicFunction.Utils
-
-
Constructor Summary
Constructors Constructor Description CataclysmicDemographic()Construct demographic model with default settingsCataclysmicDemographic(double N0, double r, double d, double t)Construct demographic model with given settings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetCataclysmTime()doublegetDeclineRate()returns the positive-valued decline ratedoublegetDemographic(double t)Gets the value of the demographic function N(t) at time t.doublegetIntensity(double t)Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).doublegetInverseIntensity(double x)Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).booleanhasIntegral()returns whether an analytical expression for the integral is implementedvoidsetCataclysmTime(double t)voidsetDeclineRate(double d)sets the decline rate.voidsetSpikeFactor(double f)An alternative parameterization of this model.-
Methods inherited from class jebl.evolution.coalescent.ExponentialGrowth
getArgument, getArgumentCount, getArgumentName, getGrowthRate, getLowerBound, getUpperBound, setArgument, setDoublingTime, setGrowthRate
-
Methods inherited from class jebl.evolution.coalescent.ConstantPopulation
getIntegral, getN0, setN0
-
-
-
-
Constructor Detail
-
CataclysmicDemographic
public CataclysmicDemographic()
Construct demographic model with default settings
-
CataclysmicDemographic
public CataclysmicDemographic(double N0, double r, double d, double t)Construct demographic model with given settings- Parameters:
N0- present-day population sizer- growth rate
-
-
Method Detail
-
getDeclineRate
public final double getDeclineRate()
returns the positive-valued decline rate
-
setDeclineRate
public void setDeclineRate(double d)
sets the decline rate.
-
getCataclysmTime
public final double getCataclysmTime()
-
setCataclysmTime
public final void setCataclysmTime(double t)
-
setSpikeFactor
public final void setSpikeFactor(double f)
An alternative parameterization of this model. This function sets the decline rate using N0 & t which must already have been set.
-
getDemographic
public double getDemographic(double t)
Description copied from interface:DemographicFunctionGets the value of the demographic function N(t) at time t.- Specified by:
getDemographicin interfaceDemographicFunction- Overrides:
getDemographicin classExponentialGrowth
-
getIntensity
public double getIntensity(double t)
Description copied from interface:DemographicFunctionReturns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).- Specified by:
getIntensityin interfaceDemographicFunction- Overrides:
getIntensityin classExponentialGrowth
-
getInverseIntensity
public double getInverseIntensity(double x)
Description copied from interface:DemographicFunctionReturns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).- Specified by:
getInverseIntensityin interfaceDemographicFunction- Overrides:
getInverseIntensityin classExponentialGrowth
-
hasIntegral
public boolean hasIntegral()
Description copied from interface:DemographicFunctionreturns whether an analytical expression for the integral is implemented- Specified by:
hasIntegralin interfaceDemographicFunction- Overrides:
hasIntegralin classConstantPopulation- Returns:
- a boolean
-
-