|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pal.misc.TimeOrderCharacterData
Character data that expresses an order through time.
Field Summary | |
protected IdGroup |
taxa
the identifier group |
protected int[] |
timeOrdinals
Order of times |
protected double[] |
times
Actual times of each sample |
protected int |
units
|
Fields inherited from interface pal.misc.BranchLimits |
ABSTOL, DEFAULT_LENGTH, FRACDIGITS, MAXARC, MINARC |
Constructor Summary | |
protected |
TimeOrderCharacterData()
Parameterless constructor for superclasses. |
|
TimeOrderCharacterData(IdGroup taxa,
int units)
Constructor taking only IdGroup. |
|
TimeOrderCharacterData(int numSeqsPerSample,
int numSamples,
double timeBetweenSamples,
int units)
Constructs a TimeOrderCharacterData. |
Method Summary | |
static TimeOrderCharacterData |
clone(TimeOrderCharacterData tocd)
Returns a clone of the specified TimeOrderCharacterData |
double[] |
getCopyOfTimes()
Returns a copy of the times in the form of an array. |
double |
getHeight(int taxon,
double rate)
NOTE: currently assumes times exist! |
int |
getIdCount()
Returns the number of identifiers in this group |
Identifier |
getIdentifier(int i)
Returns the ith identifier. |
IdGroup |
getIdGroup()
Deprecated. TimeOrderCharacterData now implements IdGroup |
java.lang.String |
getName()
Returns a name for this character data. |
int |
getNumChars()
Returns the number of characters per identifier |
int[] |
getOrdinals()
Gets ordinals. |
int |
getSampleCount()
Returns the number of unique times in this data. |
double |
getTime(int taxon)
|
int |
getTimeOrdinal(int taxon)
|
double[] |
getUniqueTimeArray()
Returns an ordered vector of unique times in this time order character data. |
double[][] |
getUniqueTimeMatrix()
Returns a matrix of times between samples. |
int |
getUnits()
|
boolean |
hasTimes()
|
void |
removeTimes()
Remove time character data. |
TimeOrderCharacterData |
scale(double rate,
int newUnits)
|
void |
setIdentifier(int i,
Identifier ident)
Sets the ith identifier. |
void |
setName(java.lang.String name)
Sets the name of this character data. |
void |
setOrdinals(int[] ordinals)
Sets ordinals. |
void |
setOrdinals(TimeOrderCharacterData tocd)
Set time ordinals from another TimeOrderCharacterData. |
void |
setOrdinals(TimeOrderCharacterData tocd,
IdGroup standard,
boolean doTimes)
Set time ordinals from another TimeOrderCharacterData. |
void |
setTimes(double[] times,
int units)
Sets the times, and works out what the ordinals should be. |
void |
setTimes(double[] times,
int units,
boolean recalculateOrdinals)
Sets the times. |
void |
setTimesAndOrdinals(TimeOrderCharacterData tocd)
|
void |
shuffleTimes()
|
TimeOrderCharacterData |
subset(IdGroup staxa)
Extracts a subset of a TimeOrderCharacterData. |
java.lang.String |
toString()
Returns a string representation of this time order character data. |
int |
whichIdNumber(java.lang.String name)
returns the index of the identifier with the given name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int[] timeOrdinals
protected double[] times
protected IdGroup taxa
protected int units
Constructor Detail |
protected TimeOrderCharacterData()
public TimeOrderCharacterData(IdGroup taxa, int units)
public TimeOrderCharacterData(int numSeqsPerSample, int numSamples, double timeBetweenSamples, int units)
Method Detail |
public static TimeOrderCharacterData clone(TimeOrderCharacterData tocd)
public TimeOrderCharacterData subset(IdGroup staxa)
public int getUnits()
public void setTimes(double[] times, int units)
public void setTimes(double[] times, int units, boolean recalculateOrdinals)
recalculateOrdinals
- true if ordinals should be
recalculated from the times.public TimeOrderCharacterData scale(double rate, int newUnits)
public void setOrdinals(int[] ordinals)
public int[] getOrdinals()
public double[] getCopyOfTimes()
public void removeTimes()
public void setOrdinals(TimeOrderCharacterData tocd)
tocd
- to take ordinals from.public void setTimesAndOrdinals(TimeOrderCharacterData tocd)
public void setOrdinals(TimeOrderCharacterData tocd, IdGroup standard, boolean doTimes)
tocd
- to take ordinals fromidgroup
- use these labels to match indices in given tocd.doTimes
- if set then sets times as wellpublic int getNumChars()
public java.lang.String getName()
public void setName(java.lang.String name)
public double getTime(int taxon)
public double getHeight(int taxon, double rate)
public int getTimeOrdinal(int taxon)
public boolean hasTimes()
public double[] getUniqueTimeArray()
public double[][] getUniqueTimeMatrix()
public int getSampleCount()
public java.lang.String toString()
toString
in class java.lang.Object
public void shuffleTimes()
public Identifier getIdentifier(int i)
IdGroup
getIdentifier
in interface IdGroup
public void setIdentifier(int i, Identifier ident)
IdGroup
setIdentifier
in interface IdGroup
public int getIdCount()
IdGroup
getIdCount
in interface IdGroup
public int whichIdNumber(java.lang.String name)
IdGroup
whichIdNumber
in interface IdGroup
public IdGroup getIdGroup()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |