411{
413 int num_children = num_nodes;
414 int inode_num = 0;
415 int num_parents = 0;
416 int j;
417
418
419
420
421
422 while( num_children > 1 )
423 {
424 for ( j = 0; j < num_children; j++ )
425 {
427 if ( inode_num == 0 )
429
430 inodes[inode_num] = nodes[j];
431
434 }
435
436
437 if ( inode_num == 0 )
438 {
439
440 nodes[num_parents++] = inodes[0];
442 }
444 {
445
447 }
448
449 num_children = num_parents;
450 num_parents = 0;
451 }
452
453
454 return nodes[0];
455}
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.