Package pal.coalescent
Class ExponentialGrowth
- java.lang.Object
-
- pal.coalescent.DemographicModel
-
- pal.coalescent.ConstantPopulation
-
- pal.coalescent.ExponentialGrowth
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Parameterized,Report,Summarizable,Units
- Direct Known Subclasses:
ConstExpGrowth,ExpandingPopulation
public class ExponentialGrowth extends ConstantPopulation implements Report, Parameterized, java.io.Serializable, Summarizable
This class models an exponentially growing (or shrinking) population (Parameters: N0=present-day population size; r=growth rate). This model is nested with the constant-population size model (r=0). Parts of this class were inspired by C++ code generously provided by Oliver Pybus.- Version:
- $Id: ExponentialGrowth.java,v 1.10 2001/07/12 12:17:43 korbinian Exp $
- Author:
- Alexei Drummond, Korbinian Strimmer
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface pal.misc.Parameterized
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils
-
-
Field Summary
Fields Modifier and Type Field Description doublergrowth rate rdoublerSEstandard error of growth rate r-
Fields inherited from class pal.coalescent.ConstantPopulation
N0, N0SE
-
Fields inherited from class pal.coalescent.DemographicModel
fo
-
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
-
-
Constructor Summary
Constructors Constructor Description ExponentialGrowth(double size, double growth, int units)Construct demographic model of an exponentially growing populationExponentialGrowth(int units)Construct demographic model with default settings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()doublegetDefaultValue(int k)get default value of parameterdoublegetDemographic(double t)Gets the value of the demographic function N(t) at time t.doublegetGrowthRate()returns growth rate.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).doublegetLowerLimit(int k)get lower parameter limitintgetNumParameters()get number of parametersdoublegetParameter(int k)get model parameterjava.lang.String[]getSummaryTypes()doublegetSummaryValue(int summaryType)doublegetUpperLimit(int k)get upper parameter limitvoidreport(java.io.PrintWriter out)print human readable report (e.g., on parameters and associated model)voidsetParameter(double value, int k)set model parametervoidsetParameterSE(double value, int k)set standard errors for model parameterjava.lang.StringtoString()-
Methods inherited from class pal.coalescent.ConstantPopulation
getN0
-
Methods inherited from class pal.coalescent.DemographicModel
computeLogLikelihood, computeLogLikelihood, getIntegral, getLogL, getSimulatedInterval, getUnits, setLogL, setUnits, testConsistency
-
-
-
-
Method Detail
-
getSummaryTypes
public java.lang.String[] getSummaryTypes()
- Specified by:
getSummaryTypesin interfaceSummarizable- Overrides:
getSummaryTypesin classConstantPopulation
-
getSummaryValue
public double getSummaryValue(int summaryType)
- Specified by:
getSummaryValuein interfaceSummarizable- Overrides:
getSummaryValuein classConstantPopulation
-
clone
public java.lang.Object clone()
- Overrides:
clonein classConstantPopulation
-
getGrowthRate
public double getGrowthRate()
returns growth rate.
-
getDemographic
public double getDemographic(double t)
Description copied from class:DemographicModelGets the value of the demographic function N(t) at time t.- Overrides:
getDemographicin classConstantPopulation
-
getIntensity
public double getIntensity(double t)
Description copied from class:DemographicModelReturns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).- Overrides:
getIntensityin classConstantPopulation
-
getInverseIntensity
public double getInverseIntensity(double x)
Description copied from class:DemographicModelReturns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).- Overrides:
getInverseIntensityin classConstantPopulation
-
getNumParameters
public int getNumParameters()
Description copied from interface:Parameterizedget number of parameters- Specified by:
getNumParametersin interfaceParameterized- Overrides:
getNumParametersin classConstantPopulation- Returns:
- number of parameters
-
getParameter
public double getParameter(int k)
Description copied from interface:Parameterizedget model parameter- Specified by:
getParameterin interfaceParameterized- Overrides:
getParameterin classConstantPopulation- Parameters:
k- parameter number- Returns:
- parameter value
-
getUpperLimit
public double getUpperLimit(int k)
Description copied from interface:Parameterizedget upper parameter limit- Specified by:
getUpperLimitin interfaceParameterized- Overrides:
getUpperLimitin classConstantPopulation- Parameters:
k- parameter number- Returns:
- upper bound
-
getLowerLimit
public double getLowerLimit(int k)
Description copied from interface:Parameterizedget lower parameter limit- Specified by:
getLowerLimitin interfaceParameterized- Overrides:
getLowerLimitin classConstantPopulation- Parameters:
k- parameter number- Returns:
- lower bound
-
getDefaultValue
public double getDefaultValue(int k)
Description copied from interface:Parameterizedget default value of parameter- Specified by:
getDefaultValuein interfaceParameterized- Overrides:
getDefaultValuein classConstantPopulation- Parameters:
k- parameter number- Returns:
- default value
-
setParameter
public void setParameter(double value, int k)Description copied from interface:Parameterizedset model parameter- Specified by:
setParameterin interfaceParameterized- Overrides:
setParameterin classConstantPopulation- Parameters:
value- parameter valuek- parameter number
-
setParameterSE
public void setParameterSE(double value, int k)Description copied from interface:Parameterizedset standard errors for model parameter- Specified by:
setParameterSEin interfaceParameterized- Overrides:
setParameterSEin classConstantPopulation- Parameters:
value- standard error of parameter valuek- parameter number
-
toString
public java.lang.String toString()
- Overrides:
toStringin classConstantPopulation
-
report
public void report(java.io.PrintWriter out)
Description copied from interface:Reportprint human readable report (e.g., on parameters and associated model)- Specified by:
reportin interfaceReport- Overrides:
reportin classConstantPopulation- Parameters:
out- output stream
-
-