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
public class ExponentialGrowth extends ConstantPopulation
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
Constructors Constructor Description ExponentialGrowth()
Construct demographic model with default settingsExponentialGrowth(double N0, double r)
Construct demographic model with given settings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getArgument(int n)
Returns the value of the nth argument of this function.int
getArgumentCount()
Returns the number of arguments for this function.java.lang.String
getArgumentName(int n)
Returns the name of the nth argument of this function.double
getDemographic(double t)
Gets the value of the demographic function N(t) at time t.double
getGrowthRate()
returns growth rate.double
getIntensity(double t)
Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).double
getInverseIntensity(double x)
Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).double
getLowerBound(int n)
Returns the lower bound of the nth argument of this function.double
getUpperBound(int n)
Returns the upper bound of the nth argument of this function.void
setArgument(int n, double value)
Sets the value of the nth argument of this function.void
setDoublingTime(double doublingTime)
An alternative parameterization of this model.void
setGrowthRate(double r)
sets growth rate.-
Methods inherited from class jebl.evolution.coalescent.ConstantPopulation
getIntegral, getN0, hasIntegral, setN0
-
-
-
-
Method Detail
-
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:DemographicFunction
Gets the value of the demographic function N(t) at time t.- Specified by:
getDemographic
in interfaceDemographicFunction
- Overrides:
getDemographic
in classConstantPopulation
-
getIntensity
public double getIntensity(double t)
Description copied from interface:DemographicFunction
Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).- Specified by:
getIntensity
in interfaceDemographicFunction
- Overrides:
getIntensity
in classConstantPopulation
-
getInverseIntensity
public double getInverseIntensity(double x)
Description copied from interface:DemographicFunction
Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).- Specified by:
getInverseIntensity
in interfaceDemographicFunction
- Overrides:
getInverseIntensity
in classConstantPopulation
-
getArgumentCount
public int getArgumentCount()
Description copied from interface:DemographicFunction
Returns the number of arguments for this function.- Specified by:
getArgumentCount
in interfaceDemographicFunction
- Overrides:
getArgumentCount
in classConstantPopulation
-
getArgumentName
public java.lang.String getArgumentName(int n)
Description copied from interface:DemographicFunction
Returns the name of the nth argument of this function.- Specified by:
getArgumentName
in interfaceDemographicFunction
- Overrides:
getArgumentName
in classConstantPopulation
-
getArgument
public double getArgument(int n)
Description copied from interface:DemographicFunction
Returns the value of the nth argument of this function.- Specified by:
getArgument
in interfaceDemographicFunction
- Overrides:
getArgument
in classConstantPopulation
-
setArgument
public void setArgument(int n, double value)
Description copied from interface:DemographicFunction
Sets the value of the nth argument of this function.- Specified by:
setArgument
in interfaceDemographicFunction
- Overrides:
setArgument
in classConstantPopulation
-
getLowerBound
public double getLowerBound(int n)
Description copied from interface:DemographicFunction
Returns the lower bound of the nth argument of this function.- Specified by:
getLowerBound
in interfaceDemographicFunction
- Overrides:
getLowerBound
in classConstantPopulation
-
getUpperBound
public double getUpperBound(int n)
Description copied from interface:DemographicFunction
Returns the upper bound of the nth argument of this function.- Specified by:
getUpperBound
in interfaceDemographicFunction
- Overrides:
getUpperBound
in classConstantPopulation
-
-