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
public class ConstExponential extends ExponentialGrowth
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
Constructors Constructor Description ConstExponential()Construct demographic model with default settingsConstExponential(double N0, double r, double N1)Construct demographic model with given settings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetArgument(int n)Returns the value of the nth argument of this function.intgetArgumentCount()Returns the number of arguments for this function.java.lang.StringgetArgumentName(int n)Returns the name of the nth argument of this function.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 inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).doublegetLowerBound(int n)Returns the lower bound of the nth argument of this function.doublegetN1()doublegetUpperBound(int n)Returns the upper bound of the nth argument of this function.booleanhasIntegral()returns whether an analytical expression for the integral is implementedvoidsetArgument(int n, double value)Sets the value of the nth argument of this function.voidsetN1(double N1)voidsetProportion(double p)-
Methods inherited from class jebl.evolution.coalescent.ExponentialGrowth
getGrowthRate, setDoublingTime, setGrowthRate
-
Methods inherited from class jebl.evolution.coalescent.ConstantPopulation
getN0, setN0
-
-
-
-
Method Detail
-
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:DemographicFunctionGets the value of the demographic function N(t) at time t.- Specified by:
getDemographicin interfaceDemographicFunction- Overrides:
getDemographicin classExponentialGrowth
-
getIntensity
public double getIntensity(double t)
Description copied from interface:DemographicFunctionReturns 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)
Description copied from interface:DemographicFunctionReturns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).- 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
-
getArgumentCount
public int getArgumentCount()
Description copied from interface:DemographicFunctionReturns the number of arguments for this function.- Specified by:
getArgumentCountin interfaceDemographicFunction- Overrides:
getArgumentCountin classExponentialGrowth
-
getArgumentName
public java.lang.String getArgumentName(int n)
Description copied from interface:DemographicFunctionReturns the name of the nth argument of this function.- Specified by:
getArgumentNamein interfaceDemographicFunction- Overrides:
getArgumentNamein classExponentialGrowth
-
getArgument
public double getArgument(int n)
Description copied from interface:DemographicFunctionReturns the value of the nth argument of this function.- Specified by:
getArgumentin interfaceDemographicFunction- Overrides:
getArgumentin classExponentialGrowth
-
setArgument
public void setArgument(int n, double value)Description copied from interface:DemographicFunctionSets the value of the nth argument of this function.- Specified by:
setArgumentin interfaceDemographicFunction- Overrides:
setArgumentin classExponentialGrowth
-
getLowerBound
public double getLowerBound(int n)
Description copied from interface:DemographicFunctionReturns the lower bound of the nth argument of this function.- Specified by:
getLowerBoundin interfaceDemographicFunction- Overrides:
getLowerBoundin classExponentialGrowth
-
getUpperBound
public double getUpperBound(int n)
Description copied from interface:DemographicFunctionReturns the upper bound of the nth argument of this function.- Specified by:
getUpperBoundin interfaceDemographicFunction- Overrides:
getUpperBoundin classExponentialGrowth
-
-