Thrill
0.1
|
Extended structure of a leaf node in memory. Contains pairs of keys and data items. Key and data slots are kept together in value_type.
Public Types | |
typedef Allocator::template rebind< LeafNode >::other | alloc_type |
Define an related allocator for the LeafNode structs. More... | |
Public Member Functions | |
void | initialize () |
Set variables to initial values. More... | |
bool | is_few () const |
True if few used entries, less than half full. More... | |
bool | is_full () const |
True if the node's slots are full. More... | |
bool | is_underflow () const |
True if node has too few entries. More... | |
const key_type & | key (size_t s) const |
Return key in slot s. More... | |
void | set_slot (unsigned short slot, const value_type &value) |
Public Member Functions inherited from BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::node | |
void | initialize (const unsigned short l) |
Delayed initialisation of constructed node. More... | |
bool | is_leafnode () const |
True if this is a leaf node. More... | |
Public Attributes | |
LeafNode * | next_leaf |
Double linked list pointers to traverse the leaves. More... | |
LeafNode * | prev_leaf |
Double linked list pointers to traverse the leaves. More... | |
value_type | slotdata [leaf_slotmax] |
Array of (key, data) pairs. More... | |
Public Attributes inherited from BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::node | |
unsigned short | level |
Level in the b-tree, if level == 0 -> leaf node. More... | |
unsigned short | slotuse |
typedef Allocator::template rebind<LeafNode>::other alloc_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return key in slot s.
Definition at line 293 of file btree.hpp.
References thrill::mem::get().
Referenced by BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::key(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_iterator::key(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::reverse_iterator::key(), and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_reverse_iterator::key().
|
inline |
Set the (key,data) pair in slot. Overloaded function used by bulk_load().
Definition at line 314 of file btree.hpp.
References TLX_BTREE_ASSERT, and gen_data::value.
LeafNode* next_leaf |
Double linked list pointers to traverse the leaves.
Definition at line 281 of file btree.hpp.
Referenced by BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::operator++(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_iterator::operator++(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::reverse_iterator::operator--(), and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_reverse_iterator::operator--().
LeafNode* prev_leaf |
Double linked list pointers to traverse the leaves.
Definition at line 278 of file btree.hpp.
Referenced by BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::reverse_iterator::operator++(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_reverse_iterator::operator++(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::operator--(), and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_iterator::operator--().
value_type slotdata[leaf_slotmax] |
Array of (key, data) pairs.
Definition at line 284 of file btree.hpp.
Referenced by BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::operator*(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_iterator::operator*(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::reverse_iterator::operator*(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_reverse_iterator::operator*(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::operator->(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_iterator::operator->(), BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::reverse_iterator::operator->(), and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_reverse_iterator::operator->().