410{
412 int num_children = num_nodes;
413 int inode_num = 0;
414 int num_parents = 0;
415 int j;
416
417
418
419
420
421 while( num_children > 1 )
422 {
423 for ( j = 0; j < num_children; j++ )
424 {
426 if ( inode_num == 0 )
428
429 inodes[inode_num] = nodes[j];
430
433 }
434
435
436 if ( inode_num == 0 )
437 {
438
439 nodes[num_parents++] = inodes[0];
441 }
443 {
444
446 }
447
448 num_children = num_parents;
449 num_parents = 0;
450 }
451
452
453 return nodes[0];
454}
void * lwalloc(size_t size)
static CIRC_NODE * circ_node_internal_new(CIRC_NODE **c, uint32_t num_nodes)
Create a new internal node, calculating the new measure range for the node, and storing pointers to t...
Note that p1 and p2 are pointers into an independent POINTARRAY, do not free them.