|
Gator Library
An implementation of the Red-Black Tree and Priority queue data structure in C++.
|
Represents a node in the red-black tree. More...
#include <redblack_tree.hpp>

Public Member Functions | |
| RbtNode (int k, const book &v) | |
| Constructs a new RbtNode object. | |
| RbtNode * | sibling () const |
| Returns the sibling of the node. | |
Public Attributes | |
| int | key |
| book | value |
| RbtNode * | left |
| RbtNode * | right |
| RbtNode * | parent |
| Color | color |
Represents a node in the red-black tree.
The RbtNode class represents a node in the red-black tree. Each node stores a key-value pair and has pointers to its left child, right child, and parent nodes. It also stores the color of the node.
Constructs a new RbtNode object.
| k | The key of the node. |
| v | The value associated with the key. |
| RbtNode * RbtNode::sibling | ( | ) | const |
Returns the sibling of the node.
| Color RbtNode::color |
The color of the node.
| int RbtNode::key |
The key of the node.
| RbtNode* RbtNode::left |
Pointer to the left child node.
| RbtNode* RbtNode::parent |
Pointer to the parent node.
| RbtNode* RbtNode::right |
Pointer to the right child node.
| book RbtNode::value |
The value associated with the key.