|
|
double |
|
GetDistance (unsigned i, unsigned j) |
|
|
|
|
Returns the value of the (i, j)th element of matrix. Assumes i and j are both in the range [0..ntax) and the distance stored at `matrix[i][j]' is not missing. Also assumes matrix is not NULL. |
|
|
|
|
unsigned |
|
GetNchar () |
|
|
|
|
Returns the value of nchar. |
|
|
|
unsigned |
|
GetNtax () |
|
|
|
|
Returns the value of ntax. |
|
|
|
|
void |
|
HandleDimensionsCommand (NxsToken &token) |
|
|
|
|
Called when DIMENSIONS command needs to be parsed from within the DISTANCES block. Deals with everything after the token DIMENSIONS up to and including the semicolon that terminates the DIMENSIONS command. |
|
|
|
void |
|
HandleFormatCommand (NxsToken &token) |
|
|
|
|
Called when FORMAT command needs to be parsed from within the DISTANCES block. Deals with everything after the token FORMAT up to and including the semicolon that terminates the FORMAT command. |
|
|
|
void |
|
HandleMatrixCommand (NxsToken &token) |
|
|
|
|
Called when MATRIX command needs to be parsed from within the DISTANCES block. Deals with everything after the token MATRIX up to and including the semicolon that terminates the MATRIX command. |
|
|
|
bool |
|
HandleNextPass (NxsToken &token, unsigned &offset) |
|
|
|
|
Called from within HandleMatrix, this function is used to deal with interleaved matrices. It is called once for each pass through the taxa. The local variable jmax records the number of columns read in the current interleaved page and is used to determine the offset used for j in subsequent pages. |
|
|
|
void |
|
HandleTaxlabelsCommand (NxsToken &token) |
|
|
|
|
Called when TAXLABELS command needs to be parsed from within the DISTANCES block. Deals with everything after the token TAXLABELS up to and including the semicolon that terminates the TAXLABELS command. |
|
|
|
|
|
bool |
|
IsLabels () |
|
|
|
|
Returns the value of labels. |
|
|
|
bool |
|
IsLowerTriangular () |
|
|
|
|
Returns true if the value of triangle is NxsDistancesBlockEnum(lower), false otherwise. |
|
|
|
bool |
|
IsMissing (unsigned i, unsigned j) |
|
|
|
|
Returns true if the (i,j)th distance is missing. Assumes i and j are both in the range [0..ntax) and matrix is not NULL. |
|
|
|
bool |
|
IsRectangular () |
|
|
|
|
Returns true if the value of triangle is NxsDistancesBlockEnum(both), false otherwise. |
|
|
|
bool |
|
IsUpperTriangular () |
|
|
|
|
Returns true if the value of triangle is NxsDistancesBlockEnum(upper), false otherwise. |
|
C |
|
|
|
NxsDistancesBlock (NxsTaxaBlock *t) |
|
|
|
|
Sets id to "DISTANCES", taxa to t, triangle to `NxsDistancesBlockEnum::lower', missing to '?', matrix and taxonPos to NULL, labels and diagonal to true, newtaxa and interleave to false, and ntax and nchar to 0. Assumes t is non-NULL. |
|
|
V |
|
void |
|
Read (NxsToken &token) |
|
|
|
|
This function provides the ability to read everything following the block name (which is read by the NEXUS object) to the end or endblock statement. Characters are read from the input stream in. Overrides the abstract virtual function in the base class. |
|
V |
|
void |
|
Report (ostream &out) |
|
|
|
|
This function outputs a brief report of the contents of this taxa block. Overrides the abstract virtual function in the base class. |
|
V |
|
void |
|
Reset () |
|
|
|
|
Flushes taxonLabels and sets ntax to 0 in preparation for reading a new TAXA block. |
|
|
|
void |
|
SetDistance (unsigned i, unsigned j, double d) |
|
|
|
|
Sets the value of the (i,j)th matrix element to d and missing to false . Assumes i and j are both in the range [0..ntax) and matrix is not NULL. |
|
|
|
void |
|
SetMissing (unsigned i, unsigned j) |
|
|
|
|
Sets the value of the (i, j)th matrix element to missing. Assumes i and j are both in the range [0..ntax) and matrix is not NULL. |
|
|
|
void |
|
SetNchar (unsigned n) |
|
|
|
|
Sets nchar to n. |
|