jebl.evolution.coalescent
Class LogisticGrowth

java.lang.Object
  extended by jebl.evolution.coalescent.ConstantPopulation
      extended by jebl.evolution.coalescent.ExponentialGrowth
          extended by jebl.evolution.coalescent.LogisticGrowth
All Implemented Interfaces:
DemographicFunction
Direct Known Subclasses:
ConstLogistic

public class LogisticGrowth
extends ExponentialGrowth

This class models logistic growth.

Author:
Alexei Drummond, Andrew Rambaut

Nested Class Summary
 
Nested classes/interfaces inherited from interface jebl.evolution.coalescent.DemographicFunction
DemographicFunction.Utils
 
Constructor Summary
LogisticGrowth()
          Construct demographic model with default settings
LogisticGrowth(double N0, double r, double c)
          Construct demographic model with given settings
 
Method Summary
 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 getShape()
           
 boolean hasIntegral()
          returns whether an analytical expression for the integral is implemented
 void setShape(double value)
           
 void setTime50(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogisticGrowth

public LogisticGrowth()
Construct demographic model with default settings


LogisticGrowth

public LogisticGrowth(double N0,
                      double r,
                      double c)
Construct demographic model with given settings

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:
getDemographic in interface DemographicFunction
Overrides:
getDemographic in class ExponentialGrowth
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:
getIntensity in interface DemographicFunction
Overrides:
getIntensity in class ExponentialGrowth

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:
getInverseIntensity in interface DemographicFunction
Overrides:
getInverseIntensity in class ExponentialGrowth

hasIntegral

public boolean hasIntegral()
Description copied from interface: DemographicFunction
returns whether an analytical expression for the integral is implemented

Specified by:
hasIntegral in interface DemographicFunction
Overrides:
hasIntegral in class ConstantPopulation
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 interface DemographicFunction
Overrides:
getIntegral in class ConstantPopulation