PostGIS  2.2.7dev-r@@SVN_REVISION@@
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 185 of file effectivearea.c.

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

Referenced by tune_areas().

186 {
187  LWDEBUG(2, "Entered minheap_pop");
188  areanode *res = tree->key_array[0];
189 
190  /*put last value first*/
191  tree->key_array[0]=tree->key_array[(tree->usedSize)-1];
192  ((areanode*) tree->key_array[0])->treeindex=0;
193 
194  tree->usedSize--;
195  down(tree,arealist,0);
196  return res;
197 }
tuple res
Definition: window.py:78
This structure is placed in an array with one member per point.
Definition: effectivearea.h:24
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
int treeindex
Definition: effectivearea.h:27
int usedSize
Definition: effectivearea.h:41
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: