|
#define | RESTRICT |
| Defined to the restrict keyword or equivalent if available. More...
|
|
#define | INLINE inline |
| Defined to the inline keyword or equivalent if available. More...
|
|
#define | NOINLINE |
| Defined to whatever compiler magic inhibits inlining if available. More...
|
|
#define | DEBUGINLINE |
| Defined to be INLINE when NDEBUG is defined, NOINLINE when DEBUG is defined, unset otherwise. More...
|
|
#define | NEDTRIEUSEMACROS 0 |
| Define to 1 to force usage of the macro implementation of nedtries. This is always 1 when compiling in C, but defaults to 0 when compiling in C++ as a template function implementation offers much more scope to the optimiser and is much easier to debug. More...
|
|
#define | NEDTRIEDEBUG 0 |
| Define to 1 if you wish a full trie validation to be performed every time you modify the trie. Requires assert() to work, so disables itself if NDEBUG is defined. More...
|
|
#define | NEDTRIE_INDEXBINS (8*sizeof(void *)) |
| Defines the number of top level bit bins to use. The default based on size_t is usually fine. More...
|
|
#define | NEDTRIE_HEAD2(name, type) |
|
#define | NEDTRIE_HEAD(name, type) NEDTRIE_HEAD2(name, struct type) |
| Substitutes the type used to store the head of the trie. More...
|
|
#define | NEDTRIE_ENTRY(type) |
| Substitutes the type used to store the per-node trie information. Occupies 5*sizeof(size_t). More...
|
|
#define | NEDTRIE_INITIALIZER(root) |
|
#define | NEDTRIE_INIT(root) do { memset((root), 0, sizeof(*(root))); } while(0) |
| Initialises a nedtrie for usage. More...
|
|
#define | NEDTRIE_EMPTY(head) (!(head)->count) |
| Returns whether a nedtrie is empty. More...
|
|
#define | NEDTRIE_COUNT(head) ((head)->count) |
| Returns the number of items in a nedtrie. More...
|
|
#define | NEDTRIE_NOBBLEZEROS(name) nedtries::trienobblezeros<name> |
| A nobble function which preferentially nobbles zeros. More...
|
|
#define | NEDTRIE_NOBBLEONES(name) nedtries::trienobbleones<name> |
| A nobble function which preferentially nobbles ones. More...
|
|
#define | NEDTRIE_NOBBLEEQUALLY(name) nedtries::trienobbleequally<name> |
| A nobble function which alternates between nobbling zeros and ones. More...
|
|
#define | NEDTRIE_GENERATE_NOBBLES(proto, name, type, field, keyfunct) |
|
#define | NEDTRIEFIELDOFFSET2(type, field) ((size_t) &(((type *)0)->field)) |
|
#define | NEDTRIEFIELDOFFSET(type, field) NEDTRIEFIELDOFFSET2(struct type, field) |
|
#define | NEDTRIE_GENERATE_INSERT(proto, name, type, field, keyfunct) |
|
#define | NEDTRIE_GENERATE_REMOVE(proto, name, type, field, keyfunct, nobblefunct) |
|
#define | NEDTRIE_GENERATE_FIND(proto, name, type, field, keyfunct) |
|
#define | NEDTRIE_GENERATE_EXACTFIND(proto, name, type, field, keyfunct) |
|
#define | NEDTRIE_GENERATE_CFIND(proto, name, type, field, keyfunct) |
|
#define | NEDTRIE_GENERATE_MINMAX(proto, name, type, field, keyfunct) |
|
#define | NEDTRIE_GENERATE_PREV(proto, name, type, field, keyfunct) |
|
#define | NEDTRIE_GENERATE_NEXT(proto, name, type, field, keyfunct) |
|
#define | NEDTRIE_GENERATE_NFIND(proto, name, type, field, keyfunct) |
|
#define | NEDTRIE_GENERATE(proto, name, type, field, keyfunct, nobblefunct) |
| Substitutes a set of nedtrie implementation function definitions specialised according to type. More...
|
|
#define | NEDTRIE_INSERT(name, x, y) name##_NEDTRIE_INSERT(x, y) |
| Inserts item y into nedtrie x. More...
|
|
#define | NEDTRIE_REMOVE(name, x, y) name##_NEDTRIE_REMOVE(x, y) |
| Removes item y from nedtrie x. More...
|
|
#define | NEDTRIE_FIND(name, x, y) name##_NEDTRIE_FIND(x, y) |
| Finds the item with the same key as y in nedtrie x. More...
|
|
#define | NEDTRIE_EXACTFIND(name, x, y) name##_NEDTRIE_EXACTFIND(x, y) |
| Returns true if there is an item with the same key and address as y in nedtrie x. More...
|
|
#define | NEDTRIE_CFIND(name, x, y, rounds) name##_NEDTRIE_CFIND(x, y, rounds) |
| Performs rounds number of attempts to find an item with an equal key to y in nedtrie x, and if none equal then the closest item with a larger key. Always returns a larger key if there is a larger key in the trie, if there isn't it returns zero. Think of rounds as how closely you want the find to fit the requested key, so INT_MAX means "as close as possible". Note that Cfind does NOT guarantee that the item returned is the next largest keyed item, use Nfind for that. More...
|
|
#define | NEDTRIE_NFIND(name, x, y) name##_NEDTRIE_NFIND(x, y) |
| Finds an item with an equal key to y in nedtrie x, and if none equal then the item with the next largest key. If the key is not equal, the returned item is guaranteed to be the next largest keyed item. More...
|
|
#define | NEDTRIE_PREV(name, x, y) name##_NEDTRIE_PREV(x, y) |
| Returns the item preceding y in nedtrie x. More...
|
|
#define | NEDTRIE_NEXT(name, x, y) name##_NEDTRIE_NEXT(x, y) |
| Returns the item following y in nedtrie x. More...
|
|
#define | NEDTRIE_PREVLEAF(name, x) name##_NEDTRIE_PREVLEAF(x) |
| Returns the item with an identical key preceding y in nedtrie x. More...
|
|
#define | NEDTRIE_NEXTLEAF(name, x) name##_NEDTRIE_NEXTLEAF(x) |
| Returns the item with an identical key following y in nedtrie x. More...
|
|
#define | NEDTRIE_MIN(name, x) name##_NEDTRIE_MINMAX(x, 0) |
| Returns the lowest item in nedtrie x. This item will approximately have the smallest key. More...
|
|
#define | NEDTRIE_MAX(name, x) name##_NEDTRIE_MINMAX(x, 1) |
| Returns the highest item in nedtrie x. This item will approximately have the biggest key. More...
|
|
#define | NEDTRIE_FOREACH(x, name, head) |
| Substitutes a for loop which forward iterates into x all items in nedtrie head. Order of items is mostly in key order (enough that a bubble sort is efficient). More...
|
|
#define | NEDTRIE_FOREACH_SAFE(x, name, head, y) |
| Substitutes a for loop which forward iterates into x all items in nedtrie head and is safe against removal of x. Order of items is mostly in key order (enough that a bubble sort is efficient). More...
|
|
#define | NEDTRIE_FOREACH_REVERSE(x, name, head) |
| Substitutes a for loop which reverse iterates into x all items in nedtrie head. Order of items is mostly inverse to key order (enough that a bubble sort is efficient). More...
|
|
#define | NEDTRIE_FOREACH_REVERSE_SAFE(x, name, head, y) |
| Substitutes a for loop which reverse iterates into x all items in nedtrie head and is safe against removal of x. Order of items is mostly inverse to key order (enough that a bubble sort is efficient). More...
|
|
#define | NEDTRIE_HASNODEHEADER(treevar, node, link) ((node)->link.trie_parent || (node)->link.trie_prev) |
| Returns true if this item's node header is active. Useful as a quick check for whether a node is in some trie. More...
|
|
|
template<class trietype > |
int | nedtries::trienobblezeros (trietype *) |
|
template<class trietype > |
int | nedtries::trienobbleones (trietype *) |
|
template<class trietype > |
int | nedtries::trienobbleequally (trietype *head) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
void | nedtries::triecheckvalidity (trietype *head) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
void | nedtries::trieinsert (trietype *head, type *r) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct, int(*)(trietype *head) nobblefunct> |
void | nedtries::trieremove (trietype *head, type *r) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
type * | nedtries::triefind (const trietype *head, const type *r) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
int | nedtries::trieexactfind (const trietype *head, const type *r) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
type * | nedtries::trieCfind (const trietype *head, const type *r, int rounds) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
type * | nedtries::trieminmax (const trietype *head, const unsigned dir) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
type * | nedtries::triebranchprev (const type *r, const TrieLink_t< type > **rlinkaddr) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
type * | nedtries::trieprev (const trietype *head, const type *r) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
type * | nedtries::triebranchnext (const type *r, const TrieLink_t< type > **rlinkaddr) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
type * | nedtries::trienext (const trietype *head, const type *r) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
type * | nedtries::trieNfind (const trietype *head, const type *r) |
|
template<class trietype , class type , size_t fieldoffset, size_t(*)(const type *) keyfunct> |
void | nedtries::triecheckvaliditybranch (trietype *head, type *node, unsigned bitidx, TrieValidityState &state) |
|