Graphviz 13.1.3~dev.20250829.1031
Loading...
Searching...
No Matches
hedges.c File Reference
#include <assert.h>
#include <neatogen/hedges.h>
#include <common/render.h>
#include <stdbool.h>
#include <stdlib.h>
#include <util/alloc.h>
#include <util/arena.h>
Include dependency graph for hedges.c:

Go to the source code of this file.

Macros

#define DELETED   -2
 

Functions

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

Macro Definition Documentation

◆ DELETED

#define DELETED   -2

Definition at line 19 of file hedges.c.

Function Documentation

◆ clamp()

static int clamp ( int  lower,
double  v,
int  upper 
)
static

convert a double to an int, between bounds

Parameters
lowerLower bound to limit to
vValue to convert
upperUpper bound to limit to
Returns
A converted value in the range [lower, upper]

Definition at line 172 of file hedges.c.

Referenced by ELleftbnd().

Here is the caller graph for this function:

◆ ELcleanup()

void ELcleanup ( el_state_t st)

Definition at line 21 of file hedges.c.

References el_state_t::allocated, free(), gv_arena_reset(), and el_state_t::hash.

Referenced by voronoi().

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

◆ ELdelete()

void ELdelete ( Halfedge he)

Definition at line 221 of file hedges.c.

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

Referenced by voronoi().

Here is the caller graph for this function:

◆ ELgethash()

static Halfedge * ELgethash ( el_state_t st,
int  b 
)
static

Definition at line 151 of file hedges.c.

References DELETED, Halfedge::ELedge, el_state_t::hash, el_state_t::hashsize, and NULL.

Referenced by ELleftbnd().

Here is the caller graph for this function:

◆ ELinitialize()

void ELinitialize ( el_state_t st)

Definition at line 26 of file hedges.c.

References Halfedge::ELleft, Halfedge::ELright, gv_calloc(), el_state_t::hash, el_state_t::hashsize, HEcreate(), el_state_t::leftend, NULL, el_state_t::rightend, 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 142 of file hedges.c.

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

Referenced by voronoi().

Here is the caller graph for this function:

◆ ELleft()

Halfedge * ELleft ( Halfedge he)

Definition at line 234 of file hedges.c.

References Halfedge::ELleft.

Referenced by voronoi().

Here is the caller graph for this function:

◆ ELleftbnd()

Halfedge * ELleftbnd ( el_state_t st,
Point p 
)

Definition at line 183 of file hedges.c.

References clamp(), deltax, ELgethash(), Halfedge::ELleft, Halfedge::ELright, el_state_t::hash, el_state_t::hashsize, el_state_t::leftend, NULL, right_of(), el_state_t::rightend, 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 229 of file hedges.c.

References Halfedge::ELright.

Referenced by voronoi().

Here is the caller graph for this function:

◆ HEcreate()

Halfedge * HEcreate ( el_state_t st,
Edge e,
char  pm 
)

Definition at line 132 of file hedges.c.

References el_state_t::allocated, ARENA_NEW, Halfedge::ELedge, Halfedge::ELpm, NULL, Halfedge::PQnext, and Halfedge::vertex.

Referenced by ELinitialize(), and voronoi().

Here is the caller graph for this function:

◆ hintersect()

Site * hintersect ( Halfedge el1,
Halfedge el2 
)

Definition at line 44 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 240 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()

static int right_of ( Halfedge el,
Point p 
)
static

Definition at line 87 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 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: