PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ minheap_update()

static void minheap_update ( MINHEAP tree,
areanode arealist,
int  idx 
)
static

The member of the minheap at index idx is changed.

Update the tree and make restore the heap property

Definition at line 218 of file effectivearea.c.

219{
220 areanode **treearray=tree->key_array;
221 int parent=floor((idx-1)/2);
222
223 if(((areanode*) treearray[idx])->area<((areanode*) treearray[parent])->area)
224 up(tree,arealist,idx);
225 else
226 down(tree,arealist,idx);
227 return;
228}
static void up(MINHEAP *tree, __attribute__((__unused__)) areanode *e, int c)
Sift Up.
static void down(MINHEAP *tree, areanode *arealist, int parent)
Sift Down.
areanode ** key_array
This structure is placed in an array with one member per point.

References down(), MINHEAP::key_array, and up().

Referenced by tune_areas().

Here is the call graph for this function:
Here is the caller graph for this function: