Graphviz 14.1.3~dev.20260207.0611
Loading...
Searching...
No Matches
fPQ.h File Reference

snode priority queue for shortPath in sgraph More...

#include <ortho/sgraph.h>
#include <util/alloc.h>
Include dependency graph for fPQ.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define N_VAL(n)   (n)->n_val
 
#define N_IDX(n)   (n)->n_idx
 
#define N_DAD(n)   (n)->n_dad
 
#define N_EDGE(n)   (n)->n_edge
 
#define E_WT(e)   (e->weight)
 

Functions

pq_tPQgen (int sz)
 
void PQfree (pq_t *pq)
 
void PQinit (pq_t *pq)
 
int PQ_insert (pq_t *pq, snode *np)
 
snodePQremove (pq_t *pq)
 
void PQupdate (pq_t *pq, snode *n, int d)
 

Macro Definition Documentation

◆ E_WT

#define E_WT (   e)    (e->weight)

Definition at line 25 of file fPQ.h.

◆ N_DAD

#define N_DAD (   n)    (n)->n_dad

Definition at line 23 of file fPQ.h.

◆ N_EDGE

#define N_EDGE (   n)    (n)->n_edge

Definition at line 24 of file fPQ.h.

◆ N_IDX

#define N_IDX (   n)    (n)->n_idx

Definition at line 22 of file fPQ.h.

◆ N_VAL

#define N_VAL (   n)    (n)->n_val

Definition at line 21 of file fPQ.h.

Function Documentation

◆ PQ_insert()

int PQ_insert ( pq_t pq,
snode np 
)
Parameters
pqPriority queue to insert into

Definition at line 66 of file fPQ.c.

References agerrorf(), pq::cnt, pq::pq, PQcheck(), PQupheap(), and pq::size.

Referenced by shortPath().

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

◆ PQfree()

void PQfree ( pq_t pq)
Parameters
pqPriority queue to deallocate

Definition at line 35 of file fPQ.c.

References free(), NULL, and pq::pq.

Referenced by makeMultiSpline(), and orthoEdges().

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

◆ PQgen()

pq_t * PQgen ( int  sz)
Returns
Created priority queue

Definition at line 26 of file fPQ.c.

References pq::cnt, pq::guard, gv_alloc(), gv_calloc(), pq::pq, and pq::size.

Referenced by makeMultiSpline(), and orthoEdges().

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

◆ PQinit()

void PQinit ( pq_t pq)
Parameters
pqPriority queue to initialize

Definition at line 42 of file fPQ.c.

References pq::cnt.

Referenced by shortPath(), and triPath().

Here is the caller graph for this function:

◆ PQremove()

snode * PQremove ( pq_t pq)
Parameters
pqPriority queue to pop

Definition at line 102 of file fPQ.c.

References pq::cnt, pq::pq, PQcheck(), and PQdownheap().

Referenced by shortPath(), and triPath().

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

◆ PQupdate()

void PQupdate ( pq_t pq,
snode n,
int  d 
)
Parameters
pqPriority queue to update

Definition at line 115 of file fPQ.c.

References snode::n_idx, N_VAL, PQcheck(), and PQupheap().

Referenced by shortPath(), and triPath().

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