public class CoalescentIntervals extends java.lang.Object implements Units, Report, java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
static int |
COALESCENT |
Denotes and interval after which a coalescent event is observed
(i.e.
|
static int |
NEW_SAMPLE |
Denotes an interval at the end of which a new sample addition is
observed (i.e.
|
static int |
NOTHING |
Denotes an interval at the end of which nothing is
observed (i.e.
|
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
Constructor | Description |
---|---|
CoalescentIntervals() |
Parameterless constructor.
|
CoalescentIntervals(int size) |
Constructor taking a number of intervals.
|
Modifier and Type | Method | Description |
---|---|---|
double |
computeLogLikelihood(DemographicModel model) |
Returns the log likelihood of this set of coalescent intervals,
given a demographic model.
|
int |
getCoalescentEvents(int i) |
Returns the number coalescent events in an interval
|
double |
getInterval(int i) |
Gets an interval.
|
int |
getIntervalCount() |
get number of intervals
|
int |
getIntervalType(int i) |
Returns the type of interval observed.
|
int |
getNumLineages(int i) |
Returns the number of uncoalesced lineages within this interval.
|
void |
getSmallIntervals(double minSize,
boolean[] smallInterval) |
Returns a list stating which of the intervals are <= minSize
(and thus should be pooled).
|
double |
getTotalHeight() |
get the total height of the genealogy represented by these
intervals.
|
int |
getUnits() |
Returns the units these coalescent intervals are
measured in.
|
void |
groupIntervals(CoalescentIntervals reference) |
Group intervals following a given (compatible) reference.
|
boolean |
isBinaryCoalescent() |
Checks whether this set of coalescent intervals is fully resolved
(i.e.
|
boolean |
isCoalescentOnly() |
Checks whether this set of coalescent intervals coalescent only
(i.e.
|
void |
poolIntervals(boolean[] smallInterval) |
Starting at time zero (i.e.
|
void |
poolSmallIntervals(double minSize) |
Starting at time zero (i.e.
|
void |
report(java.io.PrintWriter out) |
print human readable report (e.g., on parameters and associated model)
|
void |
setInterval(int i,
double value) |
Sets interval.
|
void |
setNumLineages(int i,
int numLines) |
set the number lineages for this particular interval.
|
void |
setUnits(int u) |
Sets the units these coalescent intervals are
measured in.
|
java.lang.String |
toString() |
public static final int COALESCENT
public static final int NEW_SAMPLE
public static final int NOTHING
public CoalescentIntervals()
public CoalescentIntervals(int size)
public void setUnits(int u)
public int getUnits()
public int getNumLineages(int i)
public void setNumLineages(int i, int numLines)
public int getCoalescentEvents(int i)
public int getIntervalType(int i)
public double getInterval(int i)
public void setInterval(int i, double value)
public double getTotalHeight()
public int getIntervalCount()
public boolean isBinaryCoalescent()
public boolean isCoalescentOnly()
public void groupIntervals(CoalescentIntervals reference)
public void getSmallIntervals(double minSize, boolean[] smallInterval)
public void poolIntervals(boolean[] smallInterval)
public void poolSmallIntervals(double minSize)
public double computeLogLikelihood(DemographicModel model)
public java.lang.String toString()
toString
in class java.lang.Object