Package jebl.evolution.coalescent
Class LogisticGrowth
- java.lang.Object
-
- jebl.evolution.coalescent.ConstantPopulation
-
- jebl.evolution.coalescent.ExponentialGrowth
-
- jebl.evolution.coalescent.LogisticGrowth
-
- All Implemented Interfaces:
DemographicFunction
- Direct Known Subclasses:
ConstLogistic,ExponentialLogistic
public class LogisticGrowth extends ExponentialGrowth
This class models logistic growth.- Version:
- $Id: LogisticGrowth.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 LogisticGrowth()Construct demographic model with default settingsLogisticGrowth(double N0, double r, double c)Construct demographic model with given settings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDemographic(double t)Gets the value of the demographic function N(t) at time t.doublegetIntegral(double start, double finish)Calculates the integral 1/N(x) dx between start and finish.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 demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).doublegetShape()booleanhasIntegral()returns whether an analytical expression for the integral is implementedvoidsetShape(double value)voidsetTime50(double time50)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
getN0, setN0
-
-
-
-
Method Detail
-
setShape
public void setShape(double value)
-
getShape
public double getShape()
-
setTime50
public void setTime50(double time50)
An alternative parameterization of this model. This function sets the time at which there is a 0.5 proportion of N0.
-
getDemographic
public double getDemographic(double t)
Gets the value of the demographic function N(t) at time t.- Specified by:
getDemographicin interfaceDemographicFunction- Overrides:
getDemographicin classExponentialGrowth- Parameters:
t- the time- Returns:
- the value of the demographic function N(t) at time t.
-
getIntensity
public double getIntensity(double t)
Returns 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)
Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).- 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
-
getIntegral
public double getIntegral(double start, double finish)Description copied from class:ConstantPopulationCalculates 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:
getIntegralin interfaceDemographicFunction- Overrides:
getIntegralin classConstantPopulation
-
-