Graphviz
2.41.20171026.1811
|
#include "LinkedList.h"
Go to the source code of this file.
Data Structures | |
struct | PriorityQueue_struct |
Typedefs | |
typedef struct PriorityQueue_struct * | PriorityQueue |
Functions | |
PriorityQueue | PriorityQueue_new (int n, int ngain) |
void | PriorityQueue_delete (PriorityQueue q) |
PriorityQueue | PriorityQueue_push (PriorityQueue q, int i, int gain) |
int | PriorityQueue_pop (PriorityQueue q, int *i, int *gain) |
int | PriorityQueue_remove (PriorityQueue q, int i) |
int | PriorityQueue_get_gain (PriorityQueue q, int i) |
typedef struct PriorityQueue_struct* PriorityQueue |
Definition at line 27 of file PriorityQueue.h.
void PriorityQueue_delete | ( | PriorityQueue | q | ) |
Definition at line 47 of file PriorityQueue.c.
References PriorityQueue_struct::buckets, DoubleLinkedList_delete(), FREE, PriorityQueue_struct::gain, PriorityQueue_struct::ngain, and PriorityQueue_struct::where.
int PriorityQueue_get_gain | ( | PriorityQueue | q, |
int | i | ||
) |
Definition at line 125 of file PriorityQueue.c.
References PriorityQueue_struct::gain.
PriorityQueue PriorityQueue_new | ( | int | n, |
int | ngain | ||
) |
Definition at line 27 of file PriorityQueue.c.
References PriorityQueue_struct::buckets, PriorityQueue_struct::count, PriorityQueue_struct::gain, PriorityQueue_struct::gain_max, PriorityQueue_struct::n, N_GNEW, PriorityQueue_struct::ngain, NULL, and PriorityQueue_struct::where.
int PriorityQueue_pop | ( | PriorityQueue | q, |
int * | i, | ||
int * | gain | ||
) |
Definition at line 100 of file PriorityQueue.c.
References PriorityQueue_struct::buckets, PriorityQueue_struct::count, DoubleLinkedList_delete_element(), DoubleLinkedList_get_data(), PriorityQueue_struct::gain, PriorityQueue_struct::gain_max, NULL, and PriorityQueue_struct::where.
PriorityQueue PriorityQueue_push | ( | PriorityQueue | q, |
int | i, | ||
int | gain | ||
) |
Definition at line 65 of file PriorityQueue.c.
References assert, PriorityQueue_struct::buckets, PriorityQueue_struct::count, DoubleLinkedList_delete_element(), DoubleLinkedList_new(), DoubleLinkedList_prepend(), PriorityQueue_struct::gain, PriorityQueue_struct::gain_max, N_GNEW, NULL, PriorityQueue_push(), and PriorityQueue_struct::where.
Referenced by PriorityQueue_push().
int PriorityQueue_remove | ( | PriorityQueue | q, |
int | i | ||
) |
Definition at line 129 of file PriorityQueue.c.
References PriorityQueue_struct::buckets, PriorityQueue_struct::count, DoubleLinkedList_delete_element(), PriorityQueue_struct::gain, PriorityQueue_struct::gain_max, NULL, and PriorityQueue_struct::where.