Package jebl.evolution.treesimulation
Class CoalescentIntervalGenerator
- java.lang.Object
-
- jebl.evolution.treesimulation.CoalescentIntervalGenerator
-
- All Implemented Interfaces:
IntervalGenerator
public class CoalescentIntervalGenerator extends java.lang.Object implements IntervalGenerator
This is a class that draws coalescent intervals under the given demographic function. If the demographic function class has an analytical function for the integral of 1/N(t) then this is used otherwise a numerical integrator is used. To generate a tree using this class, see the TreeSimulator class in jebl.evolution.trees. Much of this class was derived from C++ code provided by Oliver Pybus.- Version:
- $Id: CoalescentIntervalGenerator.java 1053 2010-05-10 13:00:31Z rambaut $
- Author:
- Andrew Rambaut, Oliver Pybus
-
-
Constructor Summary
Constructors Constructor Description CoalescentIntervalGenerator(DemographicFunction demographicFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getInterval(double criticalValue, int lineageCount, double currentHeight)
Calculates the waiting time to the next coalescent for a given critical value (an intensity).
-
-
-
Constructor Detail
-
CoalescentIntervalGenerator
public CoalescentIntervalGenerator(DemographicFunction demographicFunction)
-
-
Method Detail
-
getInterval
public double getInterval(double criticalValue, int lineageCount, double currentHeight)
Calculates the waiting time to the next coalescent for a given critical value (an intensity).- Specified by:
getInterval
in interfaceIntervalGenerator
- Parameters:
lineageCount
- the number of lineages presentcurrentHeight
- the starting height- Returns:
- the interval time
-
-