#include "defs.h"

Go to the source code of this file.
Classes | |
| struct | prq |
Defines | |
| #define | TYPE_PRQ(base_type, prq_type) |
| #define | _TYPE_PRQ(base_type,prq_type,comparison_function_type,get_index_function_type,set_index_function_type,initialize_function_name,delete_top_function_name,top_function_name,insert_function_name,remove_function_name,reset_function_name,size_function_name,ith_function_name) |
Typedefs | |
| typedef BOOL(* | PRQ_COMPARISON_FUNCTION )(void *, void *) |
| typedef INT32(* | PRQ_GET_INDEX_FUNCTION )(void *) |
| typedef void(* | PRQ_SET_INDEX_FUNCTION )(void *, INT) |
| typedef void(* | PRQ_ELEMENT_PRINT_FUNCTION )(void *) |
| typedef struct prq | PRQ |
Functions | |
| void | PRQ_Initialize (PRQ *prq, PRQ_COMPARISON_FUNCTION comparison_fn, PRQ_GET_INDEX_FUNCTION get_fn, PRQ_SET_INDEX_FUNCTION set_fn, MEM_POOL *pool, INT32 initial_size, INT32 expansion_factor) |
| void * | PRQ_Delete_Top (PRQ *prq) |
| void * | PRQ_Top (PRQ *prq) |
| void | PRQ_Insert (PRQ *prq, void *element) |
| void | PRQ_Remove (PRQ *prq, void *element) |
| void | PRQ_Reset (PRQ *prq) |
| INT32 | PRQ_Size (PRQ *prq) |
| void * | PRQ_Ith (PRQ *prq, INT32 i) |
| #define _TYPE_PRQ | ( | base_type, | ||
| prq_type, | ||||
| comparison_function_type, | ||||
| get_index_function_type, | ||||
| set_index_function_type, | ||||
| initialize_function_name, | ||||
| delete_top_function_name, | ||||
| top_function_name, | ||||
| insert_function_name, | ||||
| remove_function_name, | ||||
| reset_function_name, | ||||
| size_function_name, | ||||
| ith_function_name | ||||
| ) |
Definition at line 404 of file priority_queue.h.
| #define TYPE_PRQ | ( | base_type, | ||
| prq_type | ||||
| ) |
_TYPE_PRQ(base_type, \ prq_type, \ prq_type##_COMPARISON_FUNCTION, \ prq_type##_GET_INDEX_FUNCTION, \ prq_type##_SET_INDEX_FUNCTION, \ prq_type##_Initialize, \ prq_type##_Delete_Top, \ prq_type##_Top, \ prq_type##_Insert, \ prq_type##_Remove, \ prq_type##_Reset, \ prq_type##_Size, \ prq_type##_Ith)
Definition at line 374 of file priority_queue.h.
| typedef BOOL(* PRQ_COMPARISON_FUNCTION)(void *, void *) |
Definition at line 276 of file priority_queue.h.
| typedef void(* PRQ_ELEMENT_PRINT_FUNCTION)(void *) |
Definition at line 279 of file priority_queue.h.
| typedef INT32(* PRQ_GET_INDEX_FUNCTION)(void *) |
Definition at line 277 of file priority_queue.h.
| typedef void(* PRQ_SET_INDEX_FUNCTION)(void *, INT) |
Definition at line 278 of file priority_queue.h.
| void* PRQ_Delete_Top | ( | PRQ * | prq | ) |
Definition at line 312 of file priority_queue.c.
References FmtAssert, PRQ_Downheap(), PRQ_Ith(), PRQ_Set_Ith(), and PRQ_size.

| void PRQ_Initialize | ( | PRQ * | prq, | |
| PRQ_COMPARISON_FUNCTION | comparison_fn, | |||
| PRQ_GET_INDEX_FUNCTION | get_fn, | |||
| PRQ_SET_INDEX_FUNCTION | set_fn, | |||
| MEM_POOL * | pool, | |||
| INT32 | initial_size, | |||
| INT32 | expansion_factor | |||
| ) |
====================================================================== Interface routines ======================================================================
Definition at line 270 of file priority_queue.c.
References DevWarn(), PRQ_allocated_size, PRQ_comparison_fn, PRQ_expansion_factor, PRQ_get_index_fn, PRQ_heap_vector, PRQ_mem_pool, PRQ_set_index_fn, PRQ_size, and TYPE_MEM_POOL_ALLOC_N.

| void PRQ_Insert | ( | PRQ * | prq, | |
| void * | element | |||
| ) |
Definition at line 363 of file priority_queue.c.
References DevWarn(), PRQ_allocated_size, PRQ_expansion_factor, PRQ_heap_vector, PRQ_mem_pool, PRQ_Set_Ith(), PRQ_size, PRQ_Upheap(), and TYPE_MEM_POOL_REALLOC_N.

======================================================================= Utilities for manipulating the heap =======================================================================
Definition at line 81 of file priority_queue.c.
References PRQ_heap_vector.
Referenced by PRQ_Delete_Top(), PRQ_Downheap(), PRQ_Remove(), PRQ_Top(), and PRQ_Upheap().
| void PRQ_Remove | ( | PRQ * | prq, | |
| void * | element | |||
| ) |
Definition at line 403 of file priority_queue.c.
References FmtAssert, PRQ_Downheap(), PRQ_get_index_fn, PRQ_Ith(), PRQ_Set_Ith(), PRQ_size, PRQ_Upheap(), and UNDEFINED.

| void PRQ_Reset | ( | PRQ * | prq | ) |
Definition at line 470 of file priority_queue.c.
References PRQ_size.
Definition at line 98 of file priority_queue.c.
References PRQ_size.
1.7.1