STX B+ Tree Template Classes  0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Attributes
stx::btree_default_set_traits< _Key > Struct Template Reference

Generates default traits for a B+ tree used as a set. More...

#include <btree.h>

List of all members.

Static Public Attributes

static const bool selfverify = false
 If true, the tree will self verify it's invariants after each insert() or erase().
static const bool debug = false
 If true, the tree will print out debug information and a tree dump during insert() or erase() operation.
static const int leafslots = BTREE_MAX( 8, 256 / (sizeof(_Key)) )
 Number of slots in each leaf of the tree.
static const int innerslots = BTREE_MAX( 8, 256 / (sizeof(_Key) + sizeof(void*)) )
 Number of slots in each inner node of the tree.
static const size_t binsearch_threshold = 256
 As of stx-btree-0.9, the code does linear search in find_lower() and find_upper() instead of binary_search, unless the node size is larger than this threshold.

Detailed Description

template<typename _Key>
struct stx::btree_default_set_traits< _Key >

Generates default traits for a B+ tree used as a set.

It estimates leaf and inner node sizes by assuming a cache line size of 256 bytes.

Definition at line 86 of file btree.h.


Member Data Documentation

template<typename _Key >
const size_t stx::btree_default_set_traits< _Key >::binsearch_threshold = 256 [static]

As of stx-btree-0.9, the code does linear search in find_lower() and find_upper() instead of binary_search, unless the node size is larger than this threshold.

See notes at http://panthema.net/2013/0504-STX-B+Tree-Binary-vs-Linear-Search

Definition at line 110 of file btree.h.

template<typename _Key >
const bool stx::btree_default_set_traits< _Key >::debug = false [static]

If true, the tree will print out debug information and a tree dump during insert() or erase() operation.

The header must have been compiled with BTREE_DEBUG defined and key_type must be std::ostream printable.

Definition at line 96 of file btree.h.

template<typename _Key >
const int stx::btree_default_set_traits< _Key >::innerslots = BTREE_MAX( 8, 256 / (sizeof(_Key) + sizeof(void*)) ) [static]

Number of slots in each inner node of the tree.

Estimated so that each node has a size of about 256 bytes.

Definition at line 104 of file btree.h.

template<typename _Key >
const int stx::btree_default_set_traits< _Key >::leafslots = BTREE_MAX( 8, 256 / (sizeof(_Key)) ) [static]

Number of slots in each leaf of the tree.

Estimated so that each node has a size of about 256 bytes.

Definition at line 100 of file btree.h.

template<typename _Key >
const bool stx::btree_default_set_traits< _Key >::selfverify = false [static]

If true, the tree will self verify it's invariants after each insert() or erase().

The header must have been compiled with BTREE_DEBUG defined.

Definition at line 90 of file btree.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines