jebl.evolution.coalescent
Class ConstLogistic

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

public class ConstLogistic
extends LogisticGrowth

This class models logistic growth from an initial population size.

Author:
Alexei Drummond, Andrew Rambaut

Nested Class Summary
 
Nested classes/interfaces inherited from interface jebl.evolution.coalescent.DemographicFunction
DemographicFunction.Utils
 
Constructor Summary
ConstLogistic()
          Construct demographic model with default settings
ConstLogistic(double N0, double r, double c, double N1)
          Construct demographic model with given settings
 
Method Summary
 double getArgument(int n)
          Returns the value of the nth argument of this function.
 int getArgumentCount()
          Returns the number of arguments for this function.
 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 getN1()
           
 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 implemented
 void setArgument(int n, double value)
          Sets the value of the nth argument of this function.
 void setN1(double N1)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstLogistic

public ConstLogistic()
Construct demographic model with default settings


ConstLogistic

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

Method Detail

getN1

public double getN1()

setN1

public void setN1(double N1)

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

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

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 LogisticGrowth
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 LogisticGrowth

getArgumentCount

public int getArgumentCount()
Description copied from interface: DemographicFunction
Returns the number of arguments for this function.

Specified by:
getArgumentCount in interface DemographicFunction
Overrides:
getArgumentCount in class ExponentialGrowth

getArgumentName

public String getArgumentName(int n)
Description copied from interface: DemographicFunction
Returns the name of the nth argument of this function.

Specified by:
getArgumentName in interface DemographicFunction
Overrides:
getArgumentName in class ExponentialGrowth

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

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

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

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