PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ minheap_update()

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

The member of the minheap at index idx is changed.

Update the tree and make restore the heap property

Definition at line 204 of file effectivearea.c.

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

Referenced by tune_areas().

205 {
206  areanode **treearray=tree->key_array;
207  int parent=floor((idx-1)/2);
209  if(((areanode*) treearray[idx])->area<((areanode*) treearray[parent])->area)
210  up(tree,arealist,idx);
211  else
212  down(tree,arealist,idx);
213  return;
214 }
This structure is placed in an array with one member per point.
Definition: effectivearea.h:24
static void up(MINHEAP *tree, areanode *arealist, int c)
Sift Up.
areanode ** key_array
Definition: effectivearea.h:42
static void down(MINHEAP *tree, areanode *arealist, int parent)
Sift Down.
Here is the call graph for this function:
Here is the caller graph for this function: