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

Go to the source code of this file.

Macros

#define DELETED   -2
 

Functions

void ELcleanup (void)
 
void ELinitialize (void)
 
Sitehintersect (Halfedge *el1, Halfedge *el2)
 
int right_of (Halfedge *el, Point *p)
 
HalfedgeHEcreate (Edge *e, char pm)
 
void ELinsert (Halfedge *lb, Halfedge *new)
 
static HalfedgeELgethash (int b)
 
HalfedgeELleftbnd (Point *p)
 
void ELdelete (Halfedge *he)
 
HalfedgeELright (Halfedge *he)
 
HalfedgeELleft (Halfedge *he)
 
Siteleftreg (Halfedge *he)
 
Siterightreg (Halfedge *he)
 

Variables

HalfedgeELleftend
 
HalfedgeELrightend
 
static Freelist hfl
 
static int ELhashsize
 
static Halfedge ** ELhash
 
static int ntry
 
static int totalsearch
 

Macro Definition Documentation

◆ DELETED

#define DELETED   -2

Definition at line 17 of file hedges.c.

Function Documentation

◆ ELcleanup()

void ELcleanup ( void  )

Definition at line 26 of file hedges.c.

References ELhash, free(), freeinit(), hfl, and NULL.

Referenced by cleanup().

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

◆ ELdelete()

void ELdelete ( Halfedge he)

Definition at line 228 of file hedges.c.

References DELETED, Halfedge::ELedge, ELleft(), Halfedge::ELleft, ELright(), and Halfedge::ELright.

Referenced by voronoi().

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

◆ ELgethash()

static Halfedge * ELgethash ( int  b)
static

Definition at line 165 of file hedges.c.

References DELETED, Halfedge::ELedge, ELhash, ELhashsize, Halfedge::ELrefcnt, hfl, makefree(), and NULL.

Referenced by ELleftbnd().

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

◆ ELinitialize()

void ELinitialize ( void  )

Definition at line 33 of file hedges.c.

References ELhash, ELhashsize, Halfedge::ELleft, ELleftend, Halfedge::ELright, ELrightend, freeinit(), gv_calloc(), HEcreate(), hfl, NULL, and sqrt_nsites.

Referenced by voronoi().

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

◆ ELinsert()

void ELinsert ( Halfedge lb,
Halfedge new 
)

Definition at line 156 of file hedges.c.

References ELleft(), Halfedge::ELleft, and Halfedge::ELright.

Referenced by voronoi().

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

◆ ELleft()

Halfedge * ELleft ( Halfedge he)

Definition at line 241 of file hedges.c.

References Halfedge::ELleft.

Referenced by ELdelete(), ELinsert(), and voronoi().

Here is the caller graph for this function:

◆ ELleftbnd()

Halfedge * ELleftbnd ( Point p)

Definition at line 182 of file hedges.c.

References deltax, ELgethash(), ELhash, ELhashsize, Halfedge::ELleft, ELleftend, Halfedge::ELrefcnt, Halfedge::ELright, ELrightend, ntry, NULL, right_of(), totalsearch, Point::x, and xmin.

Referenced by voronoi().

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

◆ ELright()

Halfedge * ELright ( Halfedge he)

Definition at line 236 of file hedges.c.

References Halfedge::ELright.

Referenced by ELdelete(), and voronoi().

Here is the caller graph for this function:

◆ HEcreate()

Halfedge * HEcreate ( Edge e,
char  pm 
)

Definition at line 143 of file hedges.c.

References Halfedge::ELedge, Halfedge::ELpm, Halfedge::ELrefcnt, getfree(), hfl, NULL, Halfedge::PQnext, and Halfedge::vertex.

Referenced by ELinitialize(), and voronoi().

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

◆ hintersect()

Site * hintersect ( Halfedge el1,
Halfedge el2 
)

Definition at line 54 of file hedges.c.

References Edge::a, Edge::b, Edge::c, Site::coord, Halfedge::ELedge, Halfedge::ELpm, getsite(), le, NULL, re, Site::refcnt, Edge::reg, Point::x, and Point::y.

Referenced by voronoi().

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

◆ leftreg()

Site * leftreg ( Halfedge he)

Definition at line 247 of file hedges.c.

References bottomsite, Halfedge::ELedge, Halfedge::ELpm, le, NULL, re, and Edge::reg.

Referenced by voronoi().

Here is the caller graph for this function:

◆ right_of()

int right_of ( Halfedge el,
Point p 
)

Definition at line 97 of file hedges.c.

References Edge::a, Edge::b, Edge::c, coord(), Site::coord, Halfedge::ELedge, Halfedge::ELpm, le, re, Edge::reg, pointf_s::x, Point::x, and Point::y.

Referenced by ELleftbnd().

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

◆ rightreg()

Site * rightreg ( Halfedge he)

Definition at line 254 of file hedges.c.

References bottomsite, Halfedge::ELedge, Halfedge::ELpm, le, NULL, re, and Edge::reg.

Referenced by voronoi().

Here is the caller graph for this function:

Variable Documentation

◆ ELhash

Halfedge** ELhash
static

Definition at line 23 of file hedges.c.

Referenced by ELcleanup(), ELgethash(), ELinitialize(), and ELleftbnd().

◆ ELhashsize

int ELhashsize
static

Definition at line 22 of file hedges.c.

Referenced by ELgethash(), ELinitialize(), and ELleftbnd().

◆ ELleftend

Halfedge* ELleftend

Definition at line 19 of file hedges.c.

Referenced by ELinitialize(), ELleftbnd(), and voronoi().

◆ ELrightend

Halfedge * ELrightend

Definition at line 19 of file hedges.c.

Referenced by ELinitialize(), ELleftbnd(), and voronoi().

◆ hfl

Freelist hfl
static

Definition at line 21 of file hedges.c.

Referenced by ELcleanup(), ELgethash(), ELinitialize(), and HEcreate().

◆ ntry

int ntry
static

Definition at line 24 of file hedges.c.

Referenced by ELleftbnd(), and remove_overlap().

◆ totalsearch

int totalsearch
static

Definition at line 24 of file hedges.c.

Referenced by ELleftbnd().