Graphviz 13.1.3~dev.20250829.1031
|
#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>
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) |
Site * | hintersect (Halfedge *el1, Halfedge *el2) |
static int | right_of (Halfedge *el, Point *p) |
Halfedge * | HEcreate (el_state_t *st, Edge *e, char pm) |
void | ELinsert (Halfedge *lb, Halfedge *new) |
static Halfedge * | ELgethash (el_state_t *st, int b) |
static int | clamp (int lower, double v, int upper) |
Halfedge * | ELleftbnd (el_state_t *st, Point *p) |
void | ELdelete (Halfedge *he) |
Halfedge * | ELright (Halfedge *he) |
Halfedge * | ELleft (Halfedge *he) |
Site * | leftreg (Halfedge *he) |
Site * | rightreg (Halfedge *he) |
|
static |
convert a double
to an int
, between bounds
lower | Lower bound to limit to |
v | Value to convert |
upper | Upper bound to limit to |
Definition at line 172 of file hedges.c.
Referenced by ELleftbnd().
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().
void ELdelete | ( | Halfedge * | he | ) |
Definition at line 221 of file hedges.c.
References DELETED, Halfedge::ELedge, Halfedge::ELleft, and Halfedge::ELright.
Referenced by voronoi().
|
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().
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().
Definition at line 142 of file hedges.c.
References Halfedge::ELleft, and Halfedge::ELright.
Referenced by voronoi().
Definition at line 234 of file hedges.c.
References Halfedge::ELleft.
Referenced by voronoi().
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().
Definition at line 229 of file hedges.c.
References Halfedge::ELright.
Referenced by voronoi().
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().
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().
Definition at line 240 of file hedges.c.
References bottomsite, Halfedge::ELedge, Halfedge::ELpm, le, NULL, re, and Edge::reg.
Referenced by voronoi().
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().
Definition at line 247 of file hedges.c.
References bottomsite, Halfedge::ELedge, Halfedge::ELpm, le, NULL, re, and Edge::reg.
Referenced by voronoi().