Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
heap.c File Reference
#include <cgraph/alloc.h>
#include <common/render.h>
#include <stdbool.h>
#include <neatogen/mem.h>
#include <neatogen/hedges.h>
#include <neatogen/heap.h>
Include dependency graph for heap.c:

Go to the source code of this file.

Functions

static int PQbucket (Halfedge *he)
 
void PQinsert (Halfedge *he, Site *v, double offset)
 
void PQdelete (Halfedge *he)
 
bool PQempty (void)
 
Point PQ_min (void)
 
HalfedgePQextractmin (void)
 
void PQcleanup (void)
 
void PQinitialize (void)
 

Variables

static HalfedgePQhash
 
static int PQhashsize
 
static int PQcount
 
static int PQmin
 

Function Documentation

◆ PQ_min()

Point PQ_min ( void  )

Definition at line 83 of file heap.c.

References Site::coord, NULL, PQhash, PQmin, Halfedge::PQnext, Halfedge::vertex, Point::x, Point::y, and Halfedge::ystar.

Referenced by voronoi().

Here is the caller graph for this function:

◆ PQbucket()

static int PQbucket ( Halfedge he)
static

Definition at line 25 of file heap.c.

References deltay, PQhashsize, PQmin, ymin, and Halfedge::ystar.

Referenced by PQdelete(), and PQinsert().

Here is the caller graph for this function:

◆ PQcleanup()

void PQcleanup ( void  )

Definition at line 105 of file heap.c.

References free(), NULL, and PQhash.

Referenced by cleanup().

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

◆ PQdelete()

void PQdelete ( Halfedge he)

Definition at line 61 of file heap.c.

References deref(), last, NULL, PQbucket(), PQcount, PQhash, Halfedge::PQnext, and Halfedge::vertex.

Referenced by voronoi().

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

◆ PQempty()

bool PQempty ( void  )

Definition at line 77 of file heap.c.

References PQcount.

Referenced by voronoi().

Here is the caller graph for this function:

◆ PQextractmin()

Halfedge * PQextractmin ( void  )

Definition at line 95 of file heap.c.

References PQcount, PQhash, PQmin, and Halfedge::PQnext.

Referenced by voronoi().

Here is the caller graph for this function:

◆ PQinitialize()

void PQinitialize ( void  )

Definition at line 111 of file heap.c.

References gv_calloc(), NULL, PQcount, PQhash, PQhashsize, PQmin, and sqrt_nsites.

Referenced by voronoi().

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

◆ PQinsert()

void PQinsert ( Halfedge he,
Site v,
double  offset 
)

Definition at line 42 of file heap.c.

References Site::coord, last, NULL, offset, PQbucket(), PQcount, PQhash, Halfedge::PQnext, ref(), Halfedge::vertex, Point::x, Point::y, and Halfedge::ystar.

Referenced by triPath(), and voronoi().

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

Variable Documentation

◆ PQcount

int PQcount
static

Definition at line 22 of file heap.c.

Referenced by PQdelete(), PQempty(), PQextractmin(), PQinitialize(), and PQinsert().

◆ PQhash

Halfedge* PQhash
static

Definition at line 20 of file heap.c.

Referenced by PQ_min(), PQcleanup(), PQdelete(), PQextractmin(), PQinitialize(), and PQinsert().

◆ PQhashsize

int PQhashsize
static

Definition at line 21 of file heap.c.

Referenced by PQbucket(), and PQinitialize().

◆ PQmin

int PQmin
static

Definition at line 23 of file heap.c.

Referenced by PQ_min(), PQbucket(), PQextractmin(), and PQinitialize().