DemographicFunction
public class EmpiricalDemographicFunction extends java.lang.Object implements DemographicFunction
DemographicFunction.Utils
Constructor | Description |
---|---|
EmpiricalDemographicFunction(double[] populationSizes,
double[] times,
boolean stepwise) |
Modifier and Type | Method | Description |
---|---|---|
double |
getArgument(int n) |
Returns the value of the nth argument of this function.
|
int |
getArgumentCount() |
Returns the number of arguments for this function.
|
java.lang.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 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 |
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.
|
public EmpiricalDemographicFunction(double[] populationSizes, double[] times, boolean stepwise)
public double getDemographic(double t)
getDemographic
in interface DemographicFunction
public double getIntensity(double t)
getIntensity
in interface DemographicFunction
public double getInverseIntensity(double x)
getInverseIntensity
in interface DemographicFunction
public boolean hasIntegral()
DemographicFunction
hasIntegral
in interface DemographicFunction
public double getIntegral(double start, double finish)
DemographicFunction
getIntegral
in interface DemographicFunction
public int getArgumentCount()
getArgumentCount
in interface DemographicFunction
public java.lang.String getArgumentName(int n)
getArgumentName
in interface DemographicFunction
public double getArgument(int n)
getArgument
in interface DemographicFunction
public void setArgument(int n, double value)
setArgument
in interface DemographicFunction
public double getLowerBound(int n)
getLowerBound
in interface DemographicFunction
public double getUpperBound(int n)
getUpperBound
in interface DemographicFunction
http://code.google.com/p/jebl2/