Class EmpiricalDemographicFunction

java.lang.Object
jebl.evolution.coalescent.EmpiricalDemographicFunction
All Implemented Interfaces:
DemographicFunction

public class EmpiricalDemographicFunction extends Object implements DemographicFunction
Version:
$Id$
Author:
Oliver Pybus, Andrew Rambaut
  • Nested Class Summary

    Nested classes/interfaces inherited from interface jebl.evolution.coalescent.DemographicFunction

    DemographicFunction.Utils
  • Constructor Summary

    Constructors
    Constructor
    Description
    EmpiricalDemographicFunction(double[] populationSizes, double[] times, boolean stepwise)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    getArgument(int n)
    Returns the value of the nth argument of this function.
    int
    Returns the number of arguments for this function.
    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
    Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).
    double
    Returns the lower bound of the nth argument of this function.
    double
    Returns the upper bound of the nth argument of this function.
    boolean
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EmpiricalDemographicFunction

      public EmpiricalDemographicFunction(double[] populationSizes, double[] times, boolean stepwise)
  • Method Details

    • getDemographic

      public double getDemographic(double t)
      Gets the value of the demographic function N(t) at time t.
      Specified by:
      getDemographic in interface DemographicFunction
    • getIntensity

      public double getIntensity(double t)
      Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).
      Specified by:
      getIntensity in interface DemographicFunction
    • getInverseIntensity

      public double getInverseIntensity(double x)
      Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).
      Specified by:
      getInverseIntensity in interface DemographicFunction
    • 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
      Returns:
      a boolean
    • getIntegral

      public double getIntegral(double start, double finish)
      Description copied from interface: DemographicFunction
      Calculates the integral 1/N(x) dx between start and finish
      Specified by:
      getIntegral in interface DemographicFunction
    • getArgumentCount

      public int getArgumentCount()
      Returns the number of arguments for this function.
      Specified by:
      getArgumentCount in interface DemographicFunction
    • getArgumentName

      public String getArgumentName(int n)
      Returns the name of the nth argument of this function.
      Specified by:
      getArgumentName in interface DemographicFunction
    • getArgument

      public double getArgument(int n)
      Returns the value of the nth argument of this function.
      Specified by:
      getArgument in interface DemographicFunction
    • setArgument

      public void setArgument(int n, double value)
      Sets the value of the nth argument of this function.
      Specified by:
      setArgument in interface DemographicFunction
    • getLowerBound

      public double getLowerBound(int n)
      Returns the lower bound of the nth argument of this function.
      Specified by:
      getLowerBound in interface DemographicFunction
    • getUpperBound

      public double getUpperBound(int n)
      Returns the upper bound of the nth argument of this function.
      Specified by:
      getUpperBound in interface DemographicFunction