|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpal.coalescent.CoalescentIntervals
public class CoalescentIntervals
A series of coalescent intervals representing the time order information contained in a (serial) clock-constrained tree. Can model both n-coalescents and s-coalescents.
Field Summary | |
---|---|
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. |
Fields inherited from interface pal.misc.Units |
---|
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS |
Constructor Summary | |
---|---|
CoalescentIntervals()
Parameterless constructor. |
|
CoalescentIntervals(int size)
Constructor taking a number of intervals. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int COALESCENT
public static final int NEW_SAMPLE
public static final int NOTHING
Constructor Detail |
---|
public CoalescentIntervals()
public CoalescentIntervals(int size)
Method Detail |
---|
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
public void report(java.io.PrintWriter out)
Report
report
in interface Report
out
- output stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |