source: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/vmi/include/heap_info.h @ 983

Revision 983, 782 bytes checked in by gumbau, 18 years ago (diff)
Line 
1#ifndef HEAP_INFO_H
2#define HEAP_INFO_H
3/*** heap_info.h - Defines the universal heap_info_t data structure which each
4 *** heap can provide, and algorithms can use.  An algorithm which uses the
5 *** universal definition of a heap data structure can use different heaps
6 *** interchangeably for testing or comparison purposes.
7 ***/
8/*
9 *  Shane Saunders
10 */
11
12
13/* Structure to be provided by heaps and used by algorithms. */
14typedef struct heap_info {
15    int (*delete_min)(void *heap);
16    void (*insert)(void *heap, int node, double key);
17    void (*decrease_key)(void *heap, int node, double newkey);
18    int (*n)(void *heap);
19    long (*key_comps)(void *heap);
20    void *(*alloc)(int n_items);
21    void (*free)(void *heap);
22    void (*dump)(void *heap);
23} heap_info_t;
24
25
26#endif
Note: See TracBrowser for help on using the repository browser.