![]() |
CMR
1.3.0
|
Functions | |
| CMR_ERROR | CMRintheapInitStack (CMR *cmr, CMR_INTHEAP *heap, int memKeys) |
| Initializes an empty heap using stack memory. | |
| CMR_ERROR | CMRintheapClearStack (CMR *cmr, CMR_INTHEAP *heap) |
Clears the given heap. | |
| static void | debugHeap (CMR_INTHEAP *heap) |
| CMR_ERROR | CMRintheapInsert (CMR_INTHEAP *heap, int key, int value) |
Inserts a key value pair into the heap. | |
| CMR_ERROR | CMRintheapDecrease (CMR_INTHEAP *heap, int key, int newValue) |
Decreases the value of key to newValue. | |
| CMR_ERROR | CMRintheapDecreaseInsert (CMR_INTHEAP *heap, int key, int newValue) |
Decreases the value of key to newValue or inserts it. | |
| int | CMRintheapExtractMinimum (CMR_INTHEAP *heap) |
| Extracts the minimum element and returns its key. | |
| CMR_ERROR CMRintheapClearStack | ( | CMR * | cmr, |
| CMR_INTHEAP * | heap | ||
| ) |
Clears the given heap.
| cmr | CMR environment. |
| heap | Heap pointer. |
| CMR_ERROR CMRintheapDecrease | ( | CMR_INTHEAP * | heap, |
| int | key, | ||
| int | newValue | ||
| ) |
Decreases the value of key to newValue.
| heap | Heap pointer. |
| key | Key of element. |
| newValue | New value of element. |
| CMR_ERROR CMRintheapDecreaseInsert | ( | CMR_INTHEAP * | heap, |
| int | key, | ||
| int | newValue | ||
| ) |
Decreases the value of key to newValue or inserts it.
| heap | Heap pointer. |
| key | Key of element. |
| newValue | New value of element. |
| int CMRintheapExtractMinimum | ( | CMR_INTHEAP * | heap | ) |
Extracts the minimum element and returns its key.
| heap | Heap pointer. |
| CMR_ERROR CMRintheapInitStack | ( | CMR * | cmr, |
| CMR_INTHEAP * | heap, | ||
| int | memKeys | ||
| ) |
Initializes an empty heap using stack memory.
| cmr | CMR environment. |
| heap | Heap pointer. |
| memKeys | Maximum number of elements and bound on key entries. |
| CMR_ERROR CMRintheapInsert | ( | CMR_INTHEAP * | heap, |
| int | key, | ||
| int | value | ||
| ) |
Inserts a key value pair into the heap.
| heap | Heap pointer. |
| key | Key of new element. |
| value | Value of new element. |
|
inlinestatic |