src/heap/heapInt.h File Reference
#include "heap.h"
Go to the source code of this file.
Data Structures |
struct | HeapSlot |
struct | Heap |
Defines |
#define | PARENT(i) (((i)-1)>>1) |
#define | LEFT(i) (((i)<<1)+1) |
#define | RIGHT(i) (((i)+1)<<1) |
#define | ITEM(p, i) ((p)[i].item) |
#define | KEY(p, i) ((p)[i].key) |
Define Documentation
#define ITEM |
( |
p, |
|
|
i |
|
) |
((p)[i].item) |
Macro***********************************************************************
Synopsis [Returns the item stored in the i-th element in a heap.]
SideEffects [none]
Definition at line 124 of file heapInt.h.
#define KEY |
( |
p, |
|
|
i |
|
) |
((p)[i].key) |
Macro***********************************************************************
Synopsis [Returns the key of the i-th element in a heap.]
SideEffects [none]
Definition at line 133 of file heapInt.h.
#define LEFT |
( |
i |
|
) |
(((i)<<1)+1) |
Macro***********************************************************************
Synopsis [Returns the left child of the i-th element in a heap.]
SideEffects [none]
Definition at line 106 of file heapInt.h.
#define PARENT |
( |
i |
|
) |
(((i)-1)>>1) |
Macro***********************************************************************
Synopsis [Returns the parent of the i-th element in a heap.]
Description [Returns the parent of the i-th element in a heap. Argument i
should be strictly positive, otherwise the result is implementation dependent.]
SideEffects [none]
Definition at line 97 of file heapInt.h.
#define RIGHT |
( |
i |
|
) |
(((i)+1)<<1) |
Macro***********************************************************************
Synopsis [Returns the right child of the i-th element in a heap.]
SideEffects [none]
Definition at line 115 of file heapInt.h.