PatriciaTrie-Node

Defines node type patriciatrie_node_t which can be stored in tries of type patriciatrie_t.

Summary
PatriciaTrie-NodeDefines node type patriciatrie_node_t which can be stored in tries of type patriciatrie_t.
CopyrightThis program is free software.
Files
C-kern/api/ds/inmem/node/patriciatrie_node.hHeader file PatriciaTrie-Node.
Types
struct patriciatrie_node_tExport patriciatrie_node_t into global namespace.
patriciatrie_node_tManagement overhead of objects which wants to be stored in a patriciatrie_t.
bit_offsetThe bit offset of the bit to test.
leftFollow left pointer if testet bit at bit_offset is 0.
rightFollow right pointer if testet bit at bit_offset is 1.
lifetime
patriciatrie_node_INITStatic initializer.

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2012 Jörg Seebohn

Files

C-kern/api/ds/inmem/node/patriciatrie_node.h

Header file PatriciaTrie-Node.

Types

struct patriciatrie_node_t

typedef struct patriciatrie_node_t patriciatrie_node_t

Export patriciatrie_node_t into global namespace.

patriciatrie_node_t

struct patriciatrie_node_t

Management overhead of objects which wants to be stored in a patriciatrie_t.

               ╭───────╮
               │ node  │
           left├───────┤right
(bit at off-╭──┤ offset├──╮ (bit at
 set is 0)  │  ╰───────╯  │  offset is 1)
       ╭────∇──╮       ╭──∇────╮
       │ left  │       │ right │
       ├───────┤       ├───────┤
       │ offset│       │ offset│
       ╰┬─────┬╯       ╰┬─────┬╯
       left  right    left  right
Summary
bit_offsetThe bit offset of the bit to test.
leftFollow left pointer if testet bit at bit_offset is 0.
rightFollow right pointer if testet bit at bit_offset is 1.
lifetime
patriciatrie_node_INITStatic initializer.

bit_offset

size_t bit_offset

The bit offset of the bit to test.  The bit with offset 0 is bit 0x80 of the first byte of the key.

left

patriciatrie_node_t * left

Follow left pointer if testet bit at bit_offset is 0.

right

patriciatrie_node_t * right

Follow right pointer if testet bit at bit_offset is 1.

lifetime

patriciatrie_node_INIT

#define patriciatrie_node_INIT { 0, 0, 0 }

Static initializer.

struct patriciatrie_node_t
Management overhead of objects which wants to be stored in a patriciatrie_t.
Defines node type patriciatrie_node_t which can be stored in tries of type patriciatrie_t.
typedef struct patriciatrie_node_t patriciatrie_node_t
Export patriciatrie_node_t into global namespace.
size_t bit_offset
The bit offset of the bit to test.
patriciatrie_node_t * left
Follow left pointer if testet bit at bit_offset is 0.
patriciatrie_node_t * right
Follow right pointer if testet bit at bit_offset is 1.
#define patriciatrie_node_INIT { 0, 0, 0 }
Static initializer.
Close