Commit becfd284 authored by Guilherme Telles's avatar Guilherme Telles
Browse files

sources

parent 8f4563ce
......@@ -52,18 +52,21 @@ graph* nj_sn(double** D, int n) {
Sum += sum[k];
}
// The tree:
T = gr_alloc('u',2*n-2);
if (!T) goto NOMEMH;
// Store the label of the node that roots each subtree in an array:
root = (int*) malloc(n*sizeof(int));
if (!root) goto NOMEMH;
for (i=0; i<n; i++)
for (i=0; i<n; i++) {
root[i] = i;
T->V[i].flag = 1;
}
// The next hypo node:
int hyp = n;
// The tree:
T = gr_alloc('u',2*n-2);
if (!T) goto NOMEMH;
while (n > 3) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment