src/clustal/weights.c File Reference

#include <assert.h>
#include "log.h"
#include "muscle_tree.h"
#include "weights.h"
Include dependency graph for weights.c:
This graph shows which files directly or indirectly include this file:

Functions

uint CountLeaves (uint *puLeavesUnderNode, tree_t *prTree, uint uNodeIndex)
 FIXME.
void Normalise (double *p, uint n)
 Normalise values in a double array to values between 0 and 1.
int CalcClustalWeights (double **pdWeights_p, tree_t *prTree)
 Calculate "Clustal" weights from a tree.

Function Documentation

int CalcClustalWeights ( double **  pdWeights_p,
tree_t prTree 
)

Calculate "Clustal" weights from a tree.

FIXME see doc in muscle:clwwt.cpp

Parameters:
[out] pdWeights_p Will contain a weight for each leaf/sequence. Allocated here. User has to free
[in] prTree Tree to derive weights from
Returns:
0 on success, non-zero otherwise
Note:
Largely copied from Muscle3.7: clwwt.cpp:CalcClustalWWeights()
Warning:
FIXME Not sure if Muscle routines are most efficient here. Couldn't we do all this while traversing the tree and thereby safe time?
uint CountLeaves ( uint puLeavesUnderNode,
tree_t prTree,
uint  uNodeIndex 
)

FIXME.

Parameters:
[out] puLeavesUnderNode FIXME
[in] prTree FIXME
[in] uNodeIndex FIXME
Returns:
The return value
Note:
see Muscle3.7:clwwt.cpp
void Normalise ( double *  p,
uint  n 
)

Normalise values in a double array to values between 0 and 1.

Parameters:
[out] p double array with n elements
[in] n number of elements in p
Note:
From Muscle3.7: intmath.cpp:Normalize()
Generated on Fri Aug 31 05:32:52 2012 for Clustal Omega by  doxygen 1.6.3