neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::red_black_tree::node Class Reference

#include <red_black_tree.hpp>

Classes

struct  no_left_node
 
struct  no_right_node
 
struct  no_sibling
 

Public Types

enum  color_e { NIL , BLACK , RED }
 

Public Member Functions

 node (color_e aColor=RED)
 
 node (const node &aOther)
 
 ~node ()
 
bool is_nil () const
 
color_e color () const
 
void set_color (color_e aColor)
 
bool has_parent () const
 
nodeparent () const
 
void set_parent (node *aParent)
 
bool has_left () const
 
nodeleft () const
 
void set_left (node *aLeft)
 
bool has_right () const
 
noderight () const
 
void set_right (node *aRight)
 
bool has_sibling () const
 
nodesibling () const
 
void replace (node *aGarbage, node *aNil)
 

Detailed Description

Definition at line 49 of file red_black_tree.hpp.

Member Enumeration Documentation

◆ color_e

Enumerator
NIL 
BLACK 
RED 

Definition at line 56 of file red_black_tree.hpp.

Constructor & Destructor Documentation

◆ node() [1/2]

neolib::red_black_tree::node::node ( color_e  aColor = RED)
inline

Definition at line 64 of file red_black_tree.hpp.

◆ node() [2/2]

neolib::red_black_tree::node::node ( const node aOther)
inline

Definition at line 68 of file red_black_tree.hpp.

◆ ~node()

neolib::red_black_tree::node::~node ( )
inline

Definition at line 72 of file red_black_tree.hpp.

Member Function Documentation

◆ color()

color_e neolib::red_black_tree::node::color ( ) const
inline

Definition at line 81 of file red_black_tree.hpp.

◆ has_left()

bool neolib::red_black_tree::node::has_left ( ) const
inline

Definition at line 102 of file red_black_tree.hpp.

◆ has_parent()

bool neolib::red_black_tree::node::has_parent ( ) const
inline

Definition at line 90 of file red_black_tree.hpp.

◆ has_right()

bool neolib::red_black_tree::node::has_right ( ) const
inline

Definition at line 116 of file red_black_tree.hpp.

◆ has_sibling()

bool neolib::red_black_tree::node::has_sibling ( ) const
inline

Definition at line 130 of file red_black_tree.hpp.

◆ is_nil()

bool neolib::red_black_tree::node::is_nil ( ) const
inline

Definition at line 77 of file red_black_tree.hpp.

◆ left()

node * neolib::red_black_tree::node::left ( ) const
inline

Definition at line 106 of file red_black_tree.hpp.

◆ parent()

node * neolib::red_black_tree::node::parent ( ) const
inline

Definition at line 94 of file red_black_tree.hpp.

◆ replace()

void neolib::red_black_tree::node::replace ( node aGarbage,
node aNil 
)
inline

Definition at line 140 of file red_black_tree.hpp.

◆ right()

node * neolib::red_black_tree::node::right ( ) const
inline

Definition at line 120 of file red_black_tree.hpp.

◆ set_color()

void neolib::red_black_tree::node::set_color ( color_e  aColor)
inline

Definition at line 85 of file red_black_tree.hpp.

◆ set_left()

void neolib::red_black_tree::node::set_left ( node aLeft)
inline

Definition at line 112 of file red_black_tree.hpp.

◆ set_parent()

void neolib::red_black_tree::node::set_parent ( node aParent)
inline

Definition at line 98 of file red_black_tree.hpp.

◆ set_right()

void neolib::red_black_tree::node::set_right ( node aRight)
inline

Definition at line 126 of file red_black_tree.hpp.

◆ sibling()

node * neolib::red_black_tree::node::sibling ( ) const
inline

Definition at line 134 of file red_black_tree.hpp.


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