64 for (i = 1; i <=
pq->PQcnt; i++) {
82 while (
N_VAL(ppq,n =
pq[next]) < v) {
95 if (
pq->PQcnt ==
pq->PQsize) {
100 pq->pq[
pq->PQcnt] = np;
114 int lim = ppq->PQcnt/2;
121 if (j < ppq->
PQcnt) {
127 if (v >=
N_VAL(ppq,n))
break;
143 pq->pq[1] =
pq->pq[
pq->PQcnt];
151 else return pq->pq[0];
164#if defined(DEBUG) && DEBUG > 1
172 fprintf (stderr,
"Q: ");
173 for (i = 1; i <=
pq->PQcnt; i++) {
177 fprintf (stderr,
"\n");
Memory allocation wrappers that exit on failure.
static void * gv_calloc(size_t nmemb, size_t size)
void PQupdate(snode *n, int d)
void agerrorf(const char *fmt,...)
void PQinsert(pq_t *pq, Halfedge *he, Site *v, double offset)