Package jebl.evolution.coalescent
Class ExponentialLogistic
- java.lang.Object
-
- jebl.evolution.coalescent.ConstantPopulation
-
- jebl.evolution.coalescent.ExponentialGrowth
-
- jebl.evolution.coalescent.LogisticGrowth
-
- jebl.evolution.coalescent.ExponentialLogistic
-
- All Implemented Interfaces:
DemographicFunction
public class ExponentialLogistic extends LogisticGrowth
This class models logistic growth from an initial exponential phase.- Version:
- $Id: ExponentialLogistic.java 937 2008-08-08 00:11:32Z rambaut $
- Author:
- Andrew Rambaut, Alexei Drummond
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jebl.evolution.coalescent.DemographicFunction
DemographicFunction.Utils
-
-
Constructor Summary
Constructors Constructor Description ExponentialLogistic()
Construct demographic model with default settingsExponentialLogistic(double N0, double r, double c, double time, double r2)
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
getIntegral(double start, double finish)
Calculates the integral 1/N(x) dx between start and finish.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 demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).double
getLowerBound(int n)
Returns the lower bound of the nth argument of this function.double
getR2()
double
getTime()
double
getUpperBound(int n)
Returns the upper bound of the nth argument of this function.boolean
hasIntegral()
returns whether an analytical expression for the integral is implementedvoid
setArgument(int n, double value)
Sets the value of the nth argument of this function.void
setR2(double r2)
void
setTime(double time)
-
Methods inherited from class jebl.evolution.coalescent.LogisticGrowth
getShape, setShape, setTime50
-
Methods inherited from class jebl.evolution.coalescent.ExponentialGrowth
getGrowthRate, setDoublingTime, setGrowthRate
-
Methods inherited from class jebl.evolution.coalescent.ConstantPopulation
getN0, setN0
-
-
-
-
Constructor Detail
-
ExponentialLogistic
public ExponentialLogistic()
Construct demographic model with default settings
-
ExponentialLogistic
public ExponentialLogistic(double N0, double r, double c, double time, double r2)
Construct demographic model with given settings- Parameters:
N0
- Current population sizer
- Logistic-phase growth ratec
- Logistic shapetime
- Exponential-logistic phase transition timer2
- Exponential-phase growth rate
-
-
Method Detail
-
getR2
public double getR2()
-
setR2
public void setR2(double r2)
-
getTime
public double getTime()
-
setTime
public void setTime(double time)
-
getDemographic
public double getDemographic(double t)
Description copied from class:LogisticGrowth
Gets the value of the demographic function N(t) at time t.- Specified by:
getDemographic
in interfaceDemographicFunction
- Overrides:
getDemographic
in classLogisticGrowth
- Parameters:
t
- the time- Returns:
- the value of the demographic function N(t) at time t.
-
getIntensity
public double getIntensity(double t)
Description copied from class:LogisticGrowth
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 classLogisticGrowth
-
getInverseIntensity
public double getInverseIntensity(double x)
Description copied from class:LogisticGrowth
Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).- Specified by:
getInverseIntensity
in interfaceDemographicFunction
- Overrides:
getInverseIntensity
in classLogisticGrowth
-
hasIntegral
public boolean hasIntegral()
Description copied from interface:DemographicFunction
returns whether an analytical expression for the integral is implemented- Specified by:
hasIntegral
in interfaceDemographicFunction
- Overrides:
hasIntegral
in classLogisticGrowth
- Returns:
- a boolean
-
getIntegral
public double getIntegral(double start, double finish)
Description copied from class:ConstantPopulation
Calculates the integral 1/N(x) dx between start and finish. The inherited function in DemographicFunction.Abstract calls a numerical integrater which is unecessary.- Specified by:
getIntegral
in interfaceDemographicFunction
- Overrides:
getIntegral
in classLogisticGrowth
-
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 classExponentialGrowth
-
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 classExponentialGrowth
-
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 classExponentialGrowth
-
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 classExponentialGrowth
-
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 classExponentialGrowth
-
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 classExponentialGrowth
-
-