PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ minheap_pop()

static areanode* minheap_pop ( MINHEAP tree,
areanode arealist 
)
static

Get a reference to the point with the smallest effective area from the root of the min heap.

Definition at line 199 of file effectivearea.c.

200 {
201  LWDEBUG(2, "Entered minheap_pop");
202  areanode *res = tree->key_array[0];
203 
204  /*put last value first*/
205  tree->key_array[0]=tree->key_array[(tree->usedSize)-1];
206  ((areanode*) tree->key_array[0])->treeindex=0;
207 
208  tree->usedSize--;
209  down(tree,arealist,0);
210  return res;
211 }
static void down(MINHEAP *tree, areanode *arealist, int parent)
Sift Down.
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
tuple res
Definition: window.py:78
areanode ** key_array
Definition: effectivearea.h:56
int usedSize
Definition: effectivearea.h:55
int treeindex
Definition: effectivearea.h:41
This structure is placed in an array with one member per point.
Definition: effectivearea.h:39

References down(), MINHEAP::key_array, LWDEBUG, window::res, areanode::treeindex, and MINHEAP::usedSize.

Referenced by tune_areas().

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