Thrill  0.1
BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::tree_stats Struct Reference

Detailed Description

template<typename Key, typename Value, typename KeyOfValue, typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
struct tlx::BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::tree_stats

A small struct containing basic statistics about the B+ tree.

It can be fetched using get_stats().

Definition at line 1037 of file btree.hpp.

#include <btree.hpp>

Public Member Functions

 tree_stats ()
 Zero initialized. More...
 
double avgfill_leaves () const
 Return the average fill of leaves. More...
 
size_type nodes () const
 Return the total number of nodes. More...
 

Public Attributes

size_type inner_nodes
 Number of inner nodes in the B+ tree. More...
 
size_type leaves
 Number of leaves in the B+ tree. More...
 
size_type size
 Number of items in the B+ tree. More...
 

Static Public Attributes

static const unsigned short inner_slots = Self::inner_slotmax
 Base B+ tree parameter: The number of key slots in each inner node. More...
 
static const unsigned short leaf_slots = Self::leaf_slotmax
 Base B+ tree parameter: The number of key/data slots in each leaf. More...
 

Constructor & Destructor Documentation

◆ tree_stats()

tree_stats ( )
inline

Zero initialized.

Definition at line 1054 of file btree.hpp.

Member Function Documentation

◆ avgfill_leaves()

double avgfill_leaves ( ) const
inline

Return the average fill of leaves.

Definition at line 1065 of file btree.hpp.

◆ nodes()

size_type nodes ( ) const
inline

Return the total number of nodes.

Definition at line 1060 of file btree.hpp.

Member Data Documentation

◆ inner_nodes

size_type inner_nodes

Number of inner nodes in the B+ tree.

Definition at line 1045 of file btree.hpp.

◆ inner_slots

const unsigned short inner_slots = Self::inner_slotmax
static

Base B+ tree parameter: The number of key slots in each inner node.

Definition at line 1051 of file btree.hpp.

◆ leaf_slots

const unsigned short leaf_slots = Self::leaf_slotmax
static

Base B+ tree parameter: The number of key/data slots in each leaf.

Definition at line 1048 of file btree.hpp.

◆ leaves

size_type leaves

Number of leaves in the B+ tree.

Definition at line 1042 of file btree.hpp.

◆ size

size_type size

Number of items in the B+ tree.

Definition at line 1039 of file btree.hpp.


The documentation for this struct was generated from the following file: