Functions | Variables
newviewGenericSpecial.c File Reference

Functions that deal (mostly) with conditional likelihood (re)computation. More...

Functions

union __attribute__ ((aligned(PLL_BYTE_ALIGNMENT)))
 
void pllNewviewIterative (pllInstance *tr, partitionList *pr, int startIndex)
 Compute the conditional likelihood for each entry (node) of the traversal descriptor. More...
 
void computeTraversal (pllInstance *tr, nodeptr p, boolean partialTraversal, int numBranches)
 Compute the traversal descriptor of the subtree rooted at p. More...
 
void pllNewviewGeneric (pllInstance *tr, partitionList *pr, nodeptr p, boolean masked)
 Computes the conditional likelihood vectors of all nodes in the subtree rooted at p. More...
 
void newviewAncestralIterative (pllInstance *tr, partitionList *pr)
 A very simple iterative function, we only access the conditional likelihood vector at node p. More...
 
void pllNewviewGenericAncestral (pllInstance *tr, partitionList *pr, nodeptr p)
 Computes the conditional likelihood vectors of all nodes in the subtree rooted at p and the marginal ancestral probabilities at node p. More...
 
void printAncestralState (nodeptr p, boolean printStates, boolean printProbs, pllInstance *tr, partitionList *pr)
 Prints the ancestral state information for a node p to the terminal. More...
 
boolean isGap (unsigned int *x, int pos)
 Check whether the position pos in bitvector x is a gap. More...
 
boolean noGap (unsigned int *x, int pos)
 Check whether the position pos in bitvector x is NOT a gap. More...
 

Static functions

static void computeTraversalInfo (nodeptr p, traversalInfo *ti, int *counter, int maxTips, int numBranches, boolean partialTraversal, recompVectors *rvec, boolean useRecom)
 Compute a partial or full traversal descriptor for a subtree of the topology. More...
 
static void makeP (double z1, double z2, double *rptr, double *EI, double *EIGN, int numberOfCategories, double *left, double *right, boolean saveMem, int maxCat, const int states)
 Computes two P matrices for two edges. More...
 
static void newviewGTRGAMMAPROT_LG4 (int tipCase, double *x1, double *x2, double *x3, double *extEV[4], double *tipVector[4], int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean useFastScaling)
 Computation of conditional likelihood arrray for the GTR GAMMA and for the LG4 model (Optimized SSE3 version for AA data) More...
 
static void newviewGTRGAMMA_GAPPED_SAVE (int tipCase, double *x1_start, double *x2_start, double *x3_start, double *EV, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, const int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling, unsigned int *x1_gap, unsigned int *x2_gap, unsigned int *x3_gap, double *x1_gapColumn, double *x2_gapColumn, double *x3_gapColumn)
 Computation of conditional likelihood arrray for GTR GAMMA with memory saving (Optimized SSE3 version for DNA data) More...
 
static void newviewGTRGAMMA (int tipCase, double *x1_start, double *x2_start, double *x3_start, double *EV, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, const int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling)
 Computation of conditional likelihood arrray for GTR GAMMA (Optimized SSE3 version for DNA data) More...
 
static void newviewGTRCAT (int tipCase, double *EV, int *cptr, double *x1_start, double *x2_start, double *x3_start, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling)
 Computation of conditional likelihood arrray for GTR CAT (Optimized SSE3 version for DNA data) More...
 
static void newviewGTRCAT_SAVE (int tipCase, double *EV, int *cptr, double *x1_start, double *x2_start, double *x3_start, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling, unsigned int *x1_gap, unsigned int *x2_gap, unsigned int *x3_gap, double *x1_gapColumn, double *x2_gapColumn, double *x3_gapColumn, const int maxCats)
 Computation of conditional likelihood arrray for GTR CAT with memory saving (Optimized SSE3 version for DNA data) More...
 
static void newviewGTRGAMMAPROT_GAPPED_SAVE (int tipCase, double *x1, double *x2, double *x3, double *extEV, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling, unsigned int *x1_gap, unsigned int *x2_gap, unsigned int *x3_gap, double *x1_gapColumn, double *x2_gapColumn, double *x3_gapColumn)
 Computation of conditional likelihood arrray for GTR GAMMA with memory saving (Optimized SSE3 version for AA data) More...
 
static void newviewGTRGAMMAPROT (int tipCase, double *x1, double *x2, double *x3, double *extEV, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling)
 Computation of conditional likelihood arrray for GTR GAMMA (Optimized SSE3 version for AA data) More...
 
static void newviewGTRCATPROT (int tipCase, double *extEV, int *cptr, double *x1, double *x2, double *x3, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling)
 Computation of conditional likelihood arrray for GTR CAT (Optimized SSE3 version for AA data) More...
 
static void newviewGTRCATPROT_SAVE (int tipCase, double *extEV, int *cptr, double *x1, double *x2, double *x3, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling, unsigned int *x1_gap, unsigned int *x2_gap, unsigned int *x3_gap, double *x1_gapColumn, double *x2_gapColumn, double *x3_gapColumn, const int maxCats)
 Computation of conditional likelihood arrray for GTR CAT with memory saving (Optimized SSE3 version for AA data) More...
 
static void makeP_FlexLG4 (double z1, double z2, double *rptr, double *EI[4], double *EIGN[4], int numberOfCategories, double *left, double *right, const int numStates)
 Compute two P matrices for two edges for the LG4 model. More...
 
static void newviewCAT_FLEX (int tipCase, double *extEV, int *cptr, double *x1, double *x2, double *x3, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling, const int states)
 Computation of conditional likelihood arrays for CAT. More...
 
static void newviewGAMMA_FLEX (int tipCase, double *x1, double *x2, double *x3, double *extEV, double *tipVector, int *ex3, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, int *wgt, int *scalerIncrement, const boolean fastScaling, const int states, const int maxStateValue)
 Computation of conditional likelihood arrays for GAMMA. More...
 
static void ancestralCat (double *x3, double *ancestralBuffer, double *diagptable, const int n, const int numStates, int *cptr)
 Compute the marginal ancestral probability vector for CAT/PSR model. More...
 
static void ancestralGamma (double *x3, double *ancestralBuffer, double *diagptable, const int n, const int numStates, const int gammaStates)
 Compute the marginal ancestral probability vector for GAMMA model. More...
 
static void calc_diagp_Ancestral (double *rptr, double *EI, double *EIGN, int numberOfCategories, double *left, const int numStates)
 Compute a dedicated zero branch length P matrix. More...
 
static char getStateCharacter (int dataType, int state)
 Get the character representation of an enumerated DNA or AA state. More...
 

Variables

 absMask = {{0x7fffffffffffffffULL , 0x7fffffffffffffffULL }}
 
const char dnaStateNames [4]
 Array that contains letters for the four DNA base-pairs, i.e. 0 = A, 1 = C, 2 = G, 3 = T.
 
const char protStateNames [20]
 Array that contains letters for the 20 AA base-pairs.
 
const unsigned int mask32 [32]
 Array that contains the first 32 powers of 2, i.e. 2^0 upto 2^31. More...
 

Detailed Description

Functions that deal (mostly) with conditional likelihood (re)computation.

Function Documentation

static void ancestralCat ( double *  x3,
double *  ancestralBuffer,
double *  diagptable,
const int  n,
const int  numStates,
int *  cptr 
)
static

Compute the marginal ancestral probability vector for CAT/PSR model.

Computes the marginal ancestral probability vector for CAT/PSR model, given the conditional likelihood vector x3 of some node, and a zero branch length P matrix diagptable.

Parameters
x3Conditional likelihood of the node for which we are computing the ancestral vector
ancestralBufferBuffer where to store the marginal ancestral probability vector
diagptableA zero branch length P matrix
nNumber of sites in the partition to process (in the case of MPI/PTHREADS, the number of sites in the partition assigned to the current thread/process)
numStatesNumber of states
cptrArray where the rate for each site in the compressed partition alignment is stored

+ Here is the caller graph for this function:

static void ancestralGamma ( double *  x3,
double *  ancestralBuffer,
double *  diagptable,
const int  n,
const int  numStates,
const int  gammaStates 
)
static

Compute the marginal ancestral probability vector for GAMMA model.

Computes the marginal ancestral probability vector for the GAMMA model, given the conditional likelihood vector x3 of some node, and a zero branch length P matrix diagptable.

Parameters
x3Conditional likelihood of the node for which we are computing the ancestral vector
ancestralBufferBuffer where to store the marginal ancestral probability vector
diagptableA zero branch length P matrix
nNumber of sites in the partition to process (in the case of MPI/PTHREADS, the number of sites in the partition assigned to the current thread/process)
numStatesNumber of states
gammaStatesNumber of GAMMA categories times number of states

+ Here is the caller graph for this function:

static void calc_diagp_Ancestral ( double *  rptr,
double *  EI,
double *  EIGN,
int  numberOfCategories,
double *  left,
const int  numStates 
)
static

Compute a dedicated zero branch length P matrix.

Computes a P matrix by assuming a branch length of zero. This is used for the marginal ancestral probabilities recomputation.

Parameters
rptrArray of values for rate categories
EIInverse eigenvector of Q matrix
EIGNEigenvalues of Q matrix
numberOfCategoriesNumber of rate categories
leftWhere to store the resulting P matrix
numStatesNumber of states

+ Here is the caller graph for this function:

void computeTraversal ( pllInstance tr,
nodeptr  p,
boolean  partialTraversal,
int  numBranches 
)

Compute the traversal descriptor of the subtree rooted at p.

Computes the traversal descriptor of the subtree with root p. By traversal descriptory we essentially mean a preorder traversal of the unrooted topology by rooting it at a node p. If partialTraversal is set to PLL_TRUE then subtrees which are oriented correctly (i.e. if root node r of a subtree has r->x == 1) are not included in the traversal descriptor.

Parameters
trPLL instance
pNode assumed to be the root
partialTraversalIf set to PLL_TRUE, then a partial traversal descriptor is computed.
numBranchesNumber of branches (either per-partition branch or joint branch estimate)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void computeTraversalInfo ( nodeptr  p,
traversalInfo ti,
int *  counter,
int  maxTips,
int  numBranches,
boolean  partialTraversal,
recompVectors rvec,
boolean  useRecom 
)
static

Compute a partial or full traversal descriptor for a subtree of the topology.

Unless the partialTraversal is set to PLL_TRUE, compute a partial traversal descriptor down to the point/node in the tree where the conditional likelihood vector representing a subtree is already oriented in the correct direction. The elements of the traversal descriptor are stored in ti and a counter keeps track of the number of elements.

Parameters
pRoot of the subtree for which we want to compute the traversal descriptor. The two descendents are p->next->back and p->next->next->back
tii Traversal descriptor element structure
counterNumber of elements in the traversal descriptor. Updated when an element is added
maxTipsNumber of tips in the tree structure
numBranchesNumber of branches
partialTraversalIf PLL_TRUE, a partial traversal descriptor is computed, otherwise a full
rvecParameter concerning ancestral state recomputation. Please document
useRecomIf PLL_TRUE, then ancestral state recomputation is enabled.
Todo:
Fill in the ancestral recomputation parameter information

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char getStateCharacter ( int  dataType,
int  state 
)
static

Get the character representation of an enumerated DNA or AA state.

Returns the character representation of the enumarates DNA or AA state, from the constant arrays dnaStateNames (for DNA) or protStateNames (for proteins).

Parameters
dataTypeType of data, i.e. PLL_DNA_DATA or PLL_AA_DATA
stateThe number which we want to decode to a letter
Returns
Returns the decoded character

+ Here is the caller graph for this function:

boolean isGap ( unsigned int *  x,
int  pos 
)
inline

Check whether the position pos in bitvector x is a gap.

Parameters
xA bitvector represented by unsigned integers
posPosition to check in x if it is set (i.e. it is a gap)
Returns
Returns the value of the bit vector (1 if set, 0 if not)

+ Here is the caller graph for this function:

static void makeP ( double  z1,
double  z2,
double *  rptr,
double *  EI,
double *  EIGN,
int  numberOfCategories,
double *  left,
double *  right,
boolean  saveMem,
int  maxCat,
const int  states 
)
static

Computes two P matrices for two edges.

Generic function for computing the P matrices of two nodes based on their edges. This is used to (later) compute the the conditional likelihood at a node p which has two descendants q and , which in turn have the edges z1 and z2 that connect them with p. Given those edges, we compute two P matrices P(z1) and P(z2) which are stored in the arrays left and right.

The following value is computed here:

\[ EI\cdot exp( EIGN \cdot z) \]

to fill up the P matrix.

Parameters
z1Branch length leading to left descendant node (let's call it q)
z2Branch length leading to right descendant node (let's call it r)
rptrArray of values for rate categories
EIInverse eigenvectors of Q-matrix
EIGNEigenvalues of Q-matrix
numberOfCategoriesHow many rate heterogeneity categories we have, depending on GAMMA and CAT
leftWhere to store the left P matrix (for node q)
rightWhere to store the right P matrix (for node r)
saveMemIf set to PLL_TRUE, memory saving technique is enabled
maxCatMaximum number of rate categories
statesNumber of states for the particular data (4 for DNA or 20 for AA)

+ Here is the caller graph for this function:

static void makeP_FlexLG4 ( double  z1,
double  z2,
double *  rptr,
double *  EI[4],
double *  EIGN[4],
int  numberOfCategories,
double *  left,
double *  right,
const int  numStates 
)
static

Compute two P matrices for two edges for the LG4 model.

Computing the P matrices of two nodes based on their edges for the LG4 model. This is used to (later) compute the the conditional likelihood at a node p which has two descendants q and , which in turn have the edges z1 and z2 that connect them with p. Given those edges, we compute two P matrices P(z1) and P(z2) which are stored in the arrays left and right.

Parameters
z1Branch length leading to left descendant node (let's call it q)
z2Branch length leading to right descendant node (let's call it r)
rptrArray of values for rate categories
EIInverse eigenvectors of 4 Q-matrices
EIGNEigenvalues of 4 Q-matrix
numberOfCategoriesHow many rate heterogeneity categories we have, depending on GAMMA and CAT
leftWhere to store the left P matrix (for node q)
rightWhere to store the right P matrix (for node r)
numStatesNumber of states for the particular data (4 for DNA or 20 for AA)
Todo:
Present the maths here as in makeP

+ Here is the caller graph for this function:

void newviewAncestralIterative ( pllInstance tr,
partitionList pr 
)

A very simple iterative function, we only access the conditional likelihood vector at node p.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void newviewCAT_FLEX ( int  tipCase,
double *  extEV,
int *  cptr,
double *  x1,
double *  x2,
double *  x3,
double *  tipVector,
int *  ex3,
unsigned char *  tipX1,
unsigned char *  tipX2,
int  n,
double *  left,
double *  right,
int *  wgt,
int *  scalerIncrement,
const boolean  fastScaling,
const int  states 
)
static

Computation of conditional likelihood arrays for CAT.

This is a generic, slow but readable function implementation for computing the conditional likelihood arrays at p, given child nodes q and r using the CAT mode of rate heterogeneity. Depending whether q, resp. , are tips or internal nodes (indicated by tipCase) the conditional likelihoods are computed based on x1 if q is an inner node or tipX1 if it is a tip, resp. x2 if r is an inner node or tipX2 if it is a tip. Output array ex3 stores the number of times the likelihood of each site for each internal node has been scaled. The conditional likelihood vectors for any possible base-pair (which is useful when q or r are tips) has been already precomputed from the eigenvalues of the Q matrix in the array tipVector. In case the conditional likelihood for a particular site is very small in terms of a floating point number, then it is multiplied by a very large number (scaling), and then number of times it has been scaled (per node) is stored in the array ex3, if fastScaling is set to PLL_FALSE. Otherwise, the total number of scalings for all sites and all nodes is stored in a single variable scalerIncrement.

Parameters
tipCaseCan be either PLL_TIP_TIP, or PLL_TIP_INNER or PLL_INNER_INNER, and describes the descendants of the node for which we currently compute the condition likelihood vector, i.e. whether they are both tips (leaves), or one is tip and the other an inner node, or both are inner nodes.
extEVEigenvectors of Q matrix
cptrArray where the rate for each site in the compressed partition alignment is stored
x1Conditional likelihood vectors of the first child node, in case it is an internal node
x2Conditional likelihood vectors of the second child node, in case it is an internal node
x3Pointer to where the computed conditional likelihood vector of node p will be stored
tipVectorVector contining sums of left eigenvectors for likelihood computation at tips.
ex3Pointer to an array of whose elements correspond to the number of times the likelihood of a particular site of a particular internal nodeis scaled. Those elements are incremented at every scaling operation and only if fastScaling flag is set to PLL_FALSE. This array will be used later when evaluating the likelihood of the whole tree.
tipX1Pointer to the alignment data (sequence) of first child node, in case it is a tip
tipX2Pointer to the alignment data (sequence) of second child node, in case it is a tip
nNumber of sites for which we are doing the evaluation. For the single-thread version this is the number of sites in the current partition, for multi-threads this is the number of sites assigned to the running thread from the current partition.
leftPointer to the P matrix of the left child
rightPointer to the P matrix of the right child
wgtArray of weights for each site
scalerIncrementWhere to store the number of scalings carried out in case fastScaling is set to PLL_TRUE.
fastScalingIf set to PLL_TRUE, only the total number of scalings for all sites of the partition will be stored in scalerIncrement, otherwise per-site scalings are stored in the array ex3.
statesNumber of states for the particular data (4 for DNA or 20 for AA)

+ Here is the caller graph for this function:

static void newviewGAMMA_FLEX ( int  tipCase,
double *  x1,
double *  x2,
double *  x3,
double *  extEV,
double *  tipVector,
int *  ex3,
unsigned char *  tipX1,
unsigned char *  tipX2,
int  n,
double *  left,
double *  right,
int *  wgt,
int *  scalerIncrement,
const boolean  fastScaling,
const int  states,
const int  maxStateValue 
)
static

Computation of conditional likelihood arrays for GAMMA.

This is a generic, slow but readable function implementation for computing the conditional likelihood arrays at p, given child nodes q and r using the GAMMA model of rate heterogeneity. Depending whether q, resp. , are tips or internal nodes (indicated by tipCase) the conditional likelihoods are computed based on x1 if q is an inner node or tipX1 if it is a tip, resp. x2 if r is an inner node or tipX2 if it is a tip. Output array ex3 stores the number of times the likelihood of each site for each internal node has been scaled. The conditional likelihood vectors for any possible base-pair (which is useful when q or r are tips) has been already precomputed from the eigenvalues of the Q matrix in the array tipVector. In case the conditional likelihood for a particular site is very small in terms of a floating point number, then it is multiplied by a very large number (scaling), and then number of times it has been scaled (per node) is stored in the array ex3, if fastScaling is set to PLL_FALSE. Otherwise, the total number of scalings for all sites and all nodes is stored in a single variable scalerIncrement.

Parameters
tipCaseCan be either PLL_TIP_TIP, or PLL_TIP_INNER or PLL_INNER_INNER, and describes the descendants of the node for which we currently compute the condition likelihood vector, i.e. whether they are both tips (leaves), or one is tip and the other an inner node, or both are inner nodes.
x1Conditional likelihood vectors of the first child node, in case it is an internal node
x2Conditional likelihood vectors of the second child node, in case it is an internal node
x3Pointer to where the computed conditional likelihood vector of node p will be stored
extEVEigenvectors of Q matrix
tipVectorVector contining sums of left eigenvectors for likelihood computation at tips.
ex3Pointer to an array of whose elements correspond to the number of times the likelihood of a particular site of a particular internal nodeis scaled. Those elements are incremented at every scaling operation and only if fastScaling flag is set to PLL_FALSE. This array will be used later when evaluating the likelihood of the whole tree.
tipX1Pointer to the alignment data (sequence) of first child node, in case it is a tip
tipX2Pointer to the alignment data (sequence) of second child node, in case it is a tip
nNumber of sites to be processed
leftPointer to the P matrix of the left child
rightPointer to the P matrix of the right child
wgtArray of weights for each site
scalerIncrementWhere to store the number of scalings carried out in case fastScaling is set to PLL_TRUE.
fastScalingIf set to PLL_TRUE, only the total number of scalings for all sites of the partition will be stored in scalerIncrement, otherwise per-site scalings are stored in the array ex3.
statesNumber of states for the particular data (4 for DNA or 20 for AA)
maxStateValueNumber of all possible base-pairs including degenerate characters, i.e. 16 for DNA and 23 for AA

+ Here is the caller graph for this function:

boolean noGap ( unsigned int *  x,
int  pos 
)
inline

Check whether the position pos in bitvector x is NOT a gap.

Parameters
xA bitvector represented by unsigned integers
posPosition to check in x if it is NOT set (i.e. it is NOT a gap)
Returns
Returns the value of the bit vector (1 if set, 0 if not)

+ Here is the caller graph for this function:

void pllNewviewGeneric ( pllInstance tr,
partitionList pr,
nodeptr  p,
boolean  masked 
)

Computes the conditional likelihood vectors of all nodes in the subtree rooted at p.

Compute the conditional likelihood vectors of all nodes in the subtree rooted at node p. The conditional likelihood vector at node p is recomputed regardless of whether the orientation (i.e. p->x) is correct or not, and, recursuvely, the likelihoods at each node in the subtree as needed and if necessary. In case masked is set to PLL_TRUE, the computation will not take place at partitions for which the conditional likelihood has converged (for example as a reult of previous branch length optimization).

Parameters
trPLL instance
prList of partitions
pRoot of the subtree for which we want to recompute the conditional likelihood vectors
maskedIf set to PLL_TRUE, then likelihood vectors of partitions that are converged are not recomputed.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void pllNewviewGenericAncestral ( pllInstance tr,
partitionList pr,
nodeptr  p 
)

Computes the conditional likelihood vectors of all nodes in the subtree rooted at p and the marginal ancestral probabilities at node p.

Compute the conditional likelihood vectors of all nodes in the subtree rooted at node p. The conditional likelihood vector at node p is recomputed regardless of whether the orientation (i.e. p->x) is correct or not, and, recursively, the likelihoods at each node in the subtree as needed and if necessary. In addition, the marginal ancestral probability vector for node p is also computed.

Parameters
trPLL instance
prList of partitions
pNode for which we want to compute the ancestral vector
Note
This function is not implemented with the saveMemory technique.

+ Here is the call graph for this function:

void pllNewviewIterative ( pllInstance tr,
partitionList pr,
int  startIndex 
)

Compute the conditional likelihood for each entry (node) of the traversal descriptor.

Computes the conditional likelihood vectors for each entry (node) in the already computed traversal descriptor, starting from the startIndex entry.

Parameters
trPLL instance
prList of partitions
startIndexFrom which node to start computing the conditional likelihood vectors in the traversal descriptor
Note
This function just iterates over the length of the traversal descriptor and computes the conditional likelihhod arrays in the order given by the descriptor. So in a sense, this function has no clue that there is any tree-like structure in the traversal descriptor, it just operates on an array of structs of given length.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void printAncestralState ( nodeptr  p,
boolean  printStates,
boolean  printProbs,
pllInstance tr,
partitionList pr 
)

Prints the ancestral state information for a node p to the terminal.

Prints the ancestral state information for a node p to the terminal. The ancestral state sequence, resp. marginal ancestral state probabilities, is printed depending on whether printStates, resp. printProbs, is set to PLL_TRUE.

Parameters
pThe node for which to print the ancestral state sequence
printStatesIf set to PLL_TRUE then the ancestral state sequence is printed
printProbsIf set to PLL_TRUE then the marginal ancestral state probabilities are printed
trPLL instance
prList of partitions
Note
Here one can see how to store the ancestral probabilities in a dedicated data structure

+ Here is the call graph for this function:

Variable Documentation

const unsigned int mask32[32]

Array that contains the first 32 powers of 2, i.e. 2^0 upto 2^31.

Array that contains the first 32 powers of 2, i.e. 2^0 upto 2^31.