Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::AvlNodeRk_Data Class Reference

AVL node data with balance factor and subtree count. More...

#include <avlNodeRk.H>

Inheritance diagram for Aleph::AvlNodeRk_Data:
[legend]

Public Member Functions

 AvlNodeRk_Data () noexcept
 
 AvlNodeRk_Data (SentinelCtor) noexcept
 
signed chargetDiff () noexcept
 
size_tgetCount () noexcept
 
void reset () noexcept
 

Private Attributes

signed char diff = 0
 
size_t count = 1
 

Detailed Description

AVL node data with balance factor and subtree count.

This class stores the balance factor (diff) for AVL balancing and a count field for the number of nodes in the subtree rooted at this node. The count enables O(log n) select and position operations.

Definition at line 56 of file avlNodeRk.H.

Constructor & Destructor Documentation

◆ AvlNodeRk_Data() [1/2]

Aleph::AvlNodeRk_Data::AvlNodeRk_Data ( )
inlinenoexcept

Definition at line 63 of file avlNodeRk.H.

◆ AvlNodeRk_Data() [2/2]

Aleph::AvlNodeRk_Data::AvlNodeRk_Data ( SentinelCtor  )
inlinenoexcept

Definition at line 65 of file avlNodeRk.H.

Member Function Documentation

◆ getCount()

size_t & Aleph::AvlNodeRk_Data::getCount ( )
inlinenoexcept

Definition at line 69 of file avlNodeRk.H.

References count.

◆ getDiff()

signed char & Aleph::AvlNodeRk_Data::getDiff ( )
inlinenoexcept

Definition at line 67 of file avlNodeRk.H.

References diff.

◆ reset()

void Aleph::AvlNodeRk_Data::reset ( )
inlinenoexcept

Definition at line 71 of file avlNodeRk.H.

References count, and diff.

Member Data Documentation

◆ count

size_t Aleph::AvlNodeRk_Data::count = 1
private

Definition at line 59 of file avlNodeRk.H.

Referenced by getCount(), and reset().

◆ diff

signed char Aleph::AvlNodeRk_Data::diff = 0
private

Definition at line 58 of file avlNodeRk.H.

Referenced by getDiff(), and reset().


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