Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
hedges.c File Reference
#include <neatogen/mem.h>
#include <neatogen/hedges.h>
#include <common/render.h>
#include <stdbool.h>
#include <util/alloc.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
 

Macro Definition Documentation

◆ DELETED

#define DELETED   -2

Definition at line 17 of file hedges.c.

Function Documentation

◆ ELcleanup()

void ELcleanup ( void  )

Definition at line 25 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 225 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 164 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 32 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 155 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 238 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 181 of file hedges.c.

References deltax, ELgethash(), ELhash, ELhashsize, Halfedge::ELleft, ELleftend, Halfedge::ELrefcnt, Halfedge::ELright, ELrightend, NULL, right_of(), 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 233 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 142 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 53 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 244 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 96 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 251 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().