| 1 |
/** |
| 2 |
* @file |
| 3 |
* @brief @ref snode priority queue for @ref shortPath in @ref sgraph |
| 4 |
*/ |
| 5 |
|
| 6 |
/************************************************************************* |
| 7 |
* Copyright (c) 2011 AT&T Intellectual Property |
| 8 |
* All rights reserved. This program and the accompanying materials |
| 9 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 10 |
* which accompanies this distribution, and is available at |
| 11 |
* https://www.eclipse.org/legal/epl-v10.html |
| 12 |
* |
| 13 |
* Contributors: Details at https://graphviz.org |
| 14 |
*************************************************************************/ |
| 15 |
|
| 16 |
#pragma once |
| 17 |
|
| 18 |
#include <ortho/sgraph.h> |
| 19 |
#include <util/alloc.h> |
| 20 |
|
| 21 |
#define N_VAL(n) (n)->n_val |
| 22 |
#define N_IDX(n) (n)->n_idx |
| 23 |
#define N_DAD(n) (n)->n_dad |
| 24 |
#define N_EDGE(n) (n)->n_edge |
| 25 |
#define E_WT(e) (e->weight) |
| 26 |
|
| 27 |
void PQgen(int sz); |
| 28 |
void PQfree(void); |
| 29 |
void PQinit(void); |
| 30 |
void PQcheck (void); |
| 31 |
void PQupheap(int); |
| 32 |
int PQ_insert(snode* np); |
| 33 |
void PQdownheap (int k); |
| 34 |
snode* PQremove (void); |
| 35 |
void PQupdate (snode* n, int d); |
| 36 |
void PQprint (void); |