PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ 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.
Datum area(PG_FUNCTION_ARGS)
areanode ** key_array
Definition: effectivearea.h:56
This structure is placed in an array with one member per point.
Definition: effectivearea.h:39

References area(), 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: