#include <stdio.h>#include <string.h>#include <stdlib.h>#include <stdint.h>#include "coveb-tree.h"#include "bigmac.h"Defines | |
| #define | OUTERCALLOC(a, b) calloc(a,b) |
| #define | OUTERFREE(a) free(a) |
| #define | INNERCALLOC(a, b) calloc(a,b) |
| #define | INNERFREE(a) free(a) |
Functions | |
| struct vEBMPDatum | coveb_mq_min (const struct coveb_mq *q) |
| void | coveb_mq_locate_smallest_not_less_than (const struct coveb_mq *q, uint32_t incl_lower_bound, struct vEBMPDatum *result_x, uint32_t *gotresult) |
| struct vEBMPDatum | __coveb_fetch_from_bottom_table (struct vEBMPNode *v, uint32_t ind) |
| void | __coveb_store_to_bottom_table (struct vEBMPNode *v, struct vEBMPDatum d, uint32_t ind) |
| struct vEBMPDatum | coveb_mq_max (const struct coveb_mq *q) |
| uint32_t | coveb_mq_remove (struct coveb_mq *q, uint32_t x) |
| struct vEBMPDatum | coveb_mq_extractmin (struct coveb_mq *q) |
| uint32_t | coveb_mq_addresses_full (const struct coveb_mq *q) |
| uint32_t | coveb_mq_size (const struct coveb_mq *q) |
| uint32_t | coveb_mq_contains (const struct coveb_mq *q, uint32_t x) |
| struct coveb_mq * | coveb_mq_new (uint32_t payload_bits) |
| struct coveb_mq * | coveb_mq_clone (const struct coveb_mq *q) |
| void | coveb_mq_free (struct coveb_mq *q) |
| void | coveb_mq_successor (const struct coveb_mq *q, uint32_t num, struct vEBMPDatum *result_x, uint32_t *gotresult) |
| void | coveb_mq_insert (struct coveb_mq *q, struct vEBMPDatum x) |
| uint32_t coveb_mq_addresses_full | ( | const struct coveb_mq * | q | ) |
Test if the queue contains all 32-bit unsigned integers or not.
| q | mapping priority queue to be tested |
| struct coveb_mq* coveb_mq_clone | ( | const struct coveb_mq * | q | ) | [read] |
Copies a mapping priority queue.
| q | mapping priority queue to be copied |
| uint32_t coveb_mq_contains | ( | const struct coveb_mq * | q, | |
| uint32_t | x | |||
| ) |
Determines whether or not the queue contains a specific element.
| q | pointer to input mapping priority queue | |
| x | 32-bit unsigned integer to search for in the queue |
| struct vEBMPDatum coveb_mq_extractmin | ( | struct coveb_mq * | q | ) | [read] |
Remove the smallest element from the queue.
| q | pointer to input mapping priority queue |
| void coveb_mq_free | ( | struct coveb_mq * | q | ) |
Deallocate (or free) a mapping priority queue.
| q | mapping priority queue to be deallocated |
| void coveb_mq_insert | ( | struct coveb_mq * | q, | |
| struct vEBMPDatum | x | |||
| ) |
Insert an element into the queue.
| q | mapping priority queue to be scanned | |
| x | 32-bit unsigned integer _x to be inserted with payload _p. |
| void coveb_mq_locate_smallest_not_less_than | ( | const struct coveb_mq * | q, | |
| uint32_t | incl_lower_bound, | |||
| struct vEBMPDatum * | result_x, | |||
| uint32_t * | gotresult | |||
| ) |
Find the smallest element in the queue at least as big as a given lower boundary point.
| q | mapping priority queue to be scanned | |
| incl_lower_bound | 32-bit unsigned integer lower boundary point | |
| result_x | pointer to 32-bit unsigned integer output result buffer | |
| gotresult | pointer to 32-bit unsigned integer flag |
| struct vEBMPDatum coveb_mq_max | ( | const struct coveb_mq * | q | ) | [read] |
Find the maximum element in the queue.
| q | pointer to input mapping priority queue |
| struct vEBMPDatum coveb_mq_min | ( | const struct coveb_mq * | q | ) | [read] |
Find the minimum element in the queue.
| q | pointer to input mapping priority queue |
| struct coveb_mq* coveb_mq_new | ( | uint32_t | payload_bits | ) | [read] |
Allocates a new mapping priority queue. A mapping priority queue has extra space reserved for a user-defined payload of a specific number of bits. This number is called payload_bits and must be an even power of two between 1 and 256, inclusive. This is the amount of space that can be stored with each unsigned 32-bit integer entry in a mapping priority queue. This data structure makes it easy to extend the basic fast priority queue operations with your own special custom data structures and operations. Just use a 32-bit payload to store pointers to your own objects, or store them directly in 4, 8, 16, or 32 bytes.
| payload_bits | number of bits of space to store per entry in this queue |
| uint32_t coveb_mq_remove | ( | struct coveb_mq * | q, | |
| uint32_t | x | |||
| ) |
Remove an element from the queue.
| q | pointer to input mapping priority queue | |
| x | value to be removed |
| uint32_t coveb_mq_size | ( | const struct coveb_mq * | q | ) |
Returns the number of elements stored in a priority queue.
| q | pointer to input mapping priority queue |
| void coveb_mq_successor | ( | const struct coveb_mq * | q, | |
| uint32_t | num, | |||
| struct vEBMPDatum * | result_x, | |||
| uint32_t * | gotresult | |||
| ) |
Find the element in the queue after a given lower boundary point.
| q | mapping priority queue to be scanned | |
| num | 32-bit unsigned integer lower boundary point | |
| result_x | pointer to struct vEBMPDatum output result buffer | |
| gotresult | pointer to 32-bit unsigned integer flag |
1.5.5