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

Red-Black node data with color and subtree count. More...

#include <rbNodeRk.H>

Inheritance diagram for Aleph::RbNodeRk_Data:
[legend]

Public Member Functions

 RbNodeRk_Data () noexcept
 
 RbNodeRk_Data (SentinelCtor) noexcept
 
ColorgetColor () noexcept
 
size_tgetCount () noexcept
 
void reset () noexcept
 

Private Attributes

Color color
 
size_t count
 

Detailed Description

Red-Black node data with color and subtree count.

This class stores the color (RED or BLACK) for Red-Black 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 61 of file rbNodeRk.H.

Constructor & Destructor Documentation

◆ RbNodeRk_Data() [1/2]

Aleph::RbNodeRk_Data::RbNodeRk_Data ( )
inlinenoexcept

Definition at line 68 of file rbNodeRk.H.

◆ RbNodeRk_Data() [2/2]

Aleph::RbNodeRk_Data::RbNodeRk_Data ( SentinelCtor  )
inlinenoexcept

Definition at line 70 of file rbNodeRk.H.

Member Function Documentation

◆ getColor()

Color & Aleph::RbNodeRk_Data::getColor ( )
inlinenoexcept

Definition at line 72 of file rbNodeRk.H.

References color.

◆ getCount()

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

Definition at line 74 of file rbNodeRk.H.

References count.

◆ reset()

void Aleph::RbNodeRk_Data::reset ( )
inlinenoexcept

Definition at line 76 of file rbNodeRk.H.

References color, count, and RED.

Member Data Documentation

◆ color

Color Aleph::RbNodeRk_Data::color
private

Definition at line 63 of file rbNodeRk.H.

Referenced by getColor(), and reset().

◆ count

size_t Aleph::RbNodeRk_Data::count
private

Definition at line 64 of file rbNodeRk.H.

Referenced by getCount(), and reset().


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