Package jebl.evolution.coalescent
Class ConstExponential
java.lang.Object
jebl.evolution.coalescent.ConstantPopulation
jebl.evolution.coalescent.ExponentialGrowth
jebl.evolution.coalescent.ConstExponential
- All Implemented Interfaces:
DemographicFunction
This class models exponential growth from an initial population size.
- Version:
- $Id: ConstExponential.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
ConstructorsConstructorDescriptionConstruct demographic model with default settingsConstExponential
(double N0, double r, double N1) Construct demographic model with given settings -
Method Summary
Modifier and TypeMethodDescriptiondouble
getArgument
(int n) Returns the value of the nth argument of this function.int
Returns the number of arguments for this function.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 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
getN1()
double
getUpperBound
(int n) Returns the upper bound of the nth argument of this function.boolean
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
setN1
(double N1) void
setProportion
(double p) Methods inherited from class jebl.evolution.coalescent.ExponentialGrowth
getGrowthRate, setDoublingTime, setGrowthRate
Methods inherited from class jebl.evolution.coalescent.ConstantPopulation
getN0, setN0
-
Constructor Details
-
ConstExponential
public ConstExponential()Construct demographic model with default settings -
ConstExponential
public ConstExponential(double N0, double r, double N1) Construct demographic model with given settings
-
-
Method Details
-
getN1
public double getN1() -
setN1
public void setN1(double N1) -
setProportion
public void setProportion(double p) -
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 classExponentialGrowth
-
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 classExponentialGrowth
-
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 classExponentialGrowth
-
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 classConstantPopulation
- 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 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 classExponentialGrowth
-
getArgumentName
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
-