Package jebl.evolution.coalescent
Class ExponentialGrowth
java.lang.Object
jebl.evolution.coalescent.ConstantPopulation
jebl.evolution.coalescent.ExponentialGrowth
- All Implemented Interfaces:
DemographicFunction
- Direct Known Subclasses:
CataclysmicDemographic,ConstExponential,Expansion,LogisticGrowth
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: ExponentialGrowth.java 390 2006-07-20 14:33:51Z rambaut $
- Author:
- Alexei Drummond, Andrew Rambaut
-
Nested Class Summary
Nested classes/interfaces inherited from interface jebl.evolution.coalescent.DemographicFunction
DemographicFunction.Utils -
Constructor Summary
ConstructorsConstructorDescriptionConstruct demographic model with default settingsExponentialGrowth(double N0, double r) Construct demographic model with given settings -
Method Summary
Modifier and TypeMethodDescriptiondoublegetArgument(int n) Returns the value of the nth argument of this function.intReturns the number of arguments for this function.getArgumentName(int n) Returns the name of the nth argument of this function.doublegetDemographic(double t) Gets the value of the demographic function N(t) at time t.final doublereturns growth rate.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).doublegetLowerBound(int n) Returns the lower bound of the nth argument of this function.doublegetUpperBound(int n) Returns the upper bound of the nth argument of this function.voidsetArgument(int n, double value) Sets the value of the nth argument of this function.voidsetDoublingTime(double doublingTime) An alternative parameterization of this model.voidsetGrowthRate(double r) sets growth rate.Methods inherited from class jebl.evolution.coalescent.ConstantPopulation
getIntegral, getN0, hasIntegral, setN0
-
Constructor Details
-
ExponentialGrowth
public ExponentialGrowth()Construct demographic model with default settings -
ExponentialGrowth
public ExponentialGrowth(double N0, double r) Construct demographic model with given settings
-
-
Method Details
-
getGrowthRate
public final double getGrowthRate()returns growth rate. -
setGrowthRate
public void setGrowthRate(double r) sets growth rate. -
setDoublingTime
public void setDoublingTime(double doublingTime) An alternative parameterization of this model. This function sets growth rate for a given doubling time. -
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 classConstantPopulation
-
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 classConstantPopulation
-
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 classConstantPopulation
-
getArgumentCount
public int getArgumentCount()Description copied from interface:DemographicFunctionReturns the number of arguments for this function.- Specified by:
getArgumentCountin interfaceDemographicFunction- Overrides:
getArgumentCountin classConstantPopulation
-
getArgumentName
Description copied from interface:DemographicFunctionReturns the name of the nth argument of this function.- Specified by:
getArgumentNamein interfaceDemographicFunction- Overrides:
getArgumentNamein classConstantPopulation
-
getArgument
public double getArgument(int n) Description copied from interface:DemographicFunctionReturns the value of the nth argument of this function.- Specified by:
getArgumentin interfaceDemographicFunction- Overrides:
getArgumentin classConstantPopulation
-
setArgument
public void setArgument(int n, double value) Description copied from interface:DemographicFunctionSets the value of the nth argument of this function.- Specified by:
setArgumentin interfaceDemographicFunction- Overrides:
setArgumentin classConstantPopulation
-
getLowerBound
public double getLowerBound(int n) Description copied from interface:DemographicFunctionReturns the lower bound of the nth argument of this function.- Specified by:
getLowerBoundin interfaceDemographicFunction- Overrides:
getLowerBoundin classConstantPopulation
-
getUpperBound
public double getUpperBound(int n) Description copied from interface:DemographicFunctionReturns the upper bound of the nth argument of this function.- Specified by:
getUpperBoundin interfaceDemographicFunction- Overrides:
getUpperBoundin classConstantPopulation
-