Sift Down.
Definition at line 123 of file effectivearea.c.
References areanode::area, MINHEAP::key_array, LWDEBUG, and areanode::treeindex.
Referenced by minheap_pop(), and minheap_update().
134 double parentarea=((
areanode*) treearray[parent])->
area;
136 if(left<tree->usedSize)
138 leftarea=((
areanode*) treearray[left])->area;
139 if(parentarea>leftarea)
142 if(right<tree->usedSize)
144 rightarea=((
areanode*) treearray[right])->area;
145 if(rightarea<parentarea&&rightarea<leftarea)
151 tmp=treearray[parent];
152 treearray[parent]=treearray[swap];
158 if(swap<tree->usedSize)
159 down(tree,arealist,swap);
This structure is placed in an array with one member per point.
#define LWDEBUG(level, msg)
static void down(MINHEAP *tree, areanode *arealist, int parent)
Sift Down.