Graphviz 14.1.3~dev.20260204.1019
Loading...
Searching...
No Matches
fPQ.c File Reference
#include "config.h"
#include <assert.h>
#include <util/alloc.h>
#include <ortho/fPQ.h>
Include dependency graph for fPQ.c:

Go to the source code of this file.

Data Structures

struct  pq
 

Functions

pq_tPQgen (int sz)
 
void PQfree (pq_t *pq)
 
void PQinit (pq_t *pq)
 
static void PQcheck (const pq_t *pq)
 
static void PQupheap (pq_t *pq, int k)
 
int PQ_insert (pq_t *pq, snode *np)
 
static void PQdownheap (pq_t *pq, int k)
 
snodePQremove (pq_t *pq)
 
void PQupdate (pq_t *pq, snode *n, int d)
 

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:

◆ PQcheck()

static void PQcheck ( const pq_t pq)
static

Definition at line 44 of file fPQ.c.

References pq::cnt, N_IDX, and pq::pq.

Referenced by PQ_insert(), PQremove(), and PQupdate().

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

◆ PQdownheap()

static void PQdownheap ( pq_t pq,
int  k 
)
static

Definition at line 78 of file fPQ.c.

References cnt(), pq::cnt, N_IDX, N_VAL, and pq::pq.

Referenced by PQremove().

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:

◆ PQupheap()

static void PQupheap ( pq_t pq,
int  k 
)
static

Definition at line 50 of file fPQ.c.

References N_IDX, N_VAL, snode::n_val, and pq::pq.

Referenced by PQ_insert(), and PQupdate().

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