Package jebl.evolution.coalescent
Class Intervals
java.lang.Object
jebl.evolution.coalescent.Intervals
- All Implemented Interfaces:
IntervalList
A concrete class for a set of coalescent intevals.
- Version:
- $Id: Intervals.java 305 2006-04-26 00:22:30Z rambaut $
- Author:
- Andrew Rambaut, Alexei Drummond
-
Nested Class Summary
Nested classes/interfaces inherited from interface jebl.evolution.coalescent.IntervalList
IntervalList.IntervalType, IntervalList.Utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCoalescentEvent(double time) voidaddMigrationEvent(double time, int destination) voidaddNothingEvent(double time) voidaddSampleEvent(double time) voidcopyIntervals(Intervals source) intgetCoalescentEvents(int i) Returns the number coalescent events in an intervaldoublegetInterval(int i) Gets an interval.intget number of intervalsgetIntervalType(int i) Returns the type of interval observed.intgetLineageCount(int i) Returns the number of uncoalesced lineages within this interval.intget the total number of sampling events.doubleget the total duration of these intervals.booleanChecks whether this set of coalescent intervals is fully resolved (i.e.booleanChecks whether this set of coalescent intervals coalescent only (i.e.void
-
Constructor Details
-
Intervals
-
Intervals
public Intervals(int maxEventCount)
-
-
Method Details
-
copyIntervals
-
resetEvents
public void resetEvents() -
addSampleEvent
public void addSampleEvent(double time) -
addCoalescentEvent
public void addCoalescentEvent(double time) -
addMigrationEvent
public void addMigrationEvent(double time, int destination) -
addNothingEvent
public void addNothingEvent(double time) -
getSampleCount
public int getSampleCount()Description copied from interface:IntervalListget the total number of sampling events.- Specified by:
getSampleCountin interfaceIntervalList
-
getIntervalCount
public int getIntervalCount()Description copied from interface:IntervalListget number of intervals- Specified by:
getIntervalCountin interfaceIntervalList
-
getInterval
public double getInterval(int i) Description copied from interface:IntervalListGets an interval.- Specified by:
getIntervalin interfaceIntervalList
-
getLineageCount
public int getLineageCount(int i) Description copied from interface:IntervalListReturns the number of uncoalesced lineages within this interval. Required for s-coalescents, where new lineages are added as earlier samples are come across.- Specified by:
getLineageCountin interfaceIntervalList
-
getCoalescentEvents
public int getCoalescentEvents(int i) Description copied from interface:IntervalListReturns the number coalescent events in an interval- Specified by:
getCoalescentEventsin interfaceIntervalList
-
getIntervalType
Description copied from interface:IntervalListReturns the type of interval observed.- Specified by:
getIntervalTypein interfaceIntervalList
-
getTotalDuration
public double getTotalDuration()Description copied from interface:IntervalListget the total duration of these intervals.- Specified by:
getTotalDurationin interfaceIntervalList
-
isBinaryCoalescent
public boolean isBinaryCoalescent()Description copied from interface:IntervalListChecks whether this set of coalescent intervals is fully resolved (i.e. whether is has exactly one coalescent event in each subsequent interval)- Specified by:
isBinaryCoalescentin interfaceIntervalList
-
isCoalescentOnly
public boolean isCoalescentOnly()Description copied from interface:IntervalListChecks whether this set of coalescent intervals coalescent only (i.e. whether is has exactly one or more coalescent event in each subsequent interval)- Specified by:
isCoalescentOnlyin interfaceIntervalList
-