libxr
Embedded C++ framework for bare-metal, RTOS and Linux
Loading...
Searching...
No Matches
LibXR::RBTree< Key >::BaseNode Class Reference

红黑树的基本节点结构 / Base node structure of the Red-Black Tree. More...

#include <rbt.hpp>

Inheritance diagram for LibXR::RBTree< Key >::BaseNode:
[legend]
Collaboration diagram for LibXR::RBTree< Key >::BaseNode:
[legend]

Public Attributes

Key key
 节点键值 / Key associated with the node.
 
RbtColor color
 节点颜色 / Color of the node.
 
BaseNode * left = nullptr
 左子节点 / Left child node.
 
BaseNode * right = nullptr
 右子节点 / Right child node.
 
BaseNode * parent = nullptr
 父节点 / Parent node.
 
size_t size
 节点大小 / Size of the node.
 

Protected Member Functions

 BaseNode (size_t size)
 基本节点构造函数 / Constructor for BaseNode.
 

Detailed Description

template<typename Key>
class LibXR::RBTree< Key >::BaseNode

红黑树的基本节点结构 / Base node structure of the Red-Black Tree.

Definition at line 37 of file rbt.hpp.

Constructor & Destructor Documentation

◆ BaseNode()

template<typename Key >
LibXR::RBTree< Key >::BaseNode::BaseNode ( size_t size)
inlineexplicitprotected

基本节点构造函数 / Constructor for BaseNode.

Parameters
size节点数据大小 / Size of the node's data.

Definition at line 52 of file rbt.hpp.

52: size(size) {}
size_t size
节点大小 / Size of the node.
Definition rbt.hpp:45

Member Data Documentation

◆ color

template<typename Key >
RbtColor LibXR::RBTree< Key >::BaseNode::color

节点颜色 / Color of the node.

Definition at line 41 of file rbt.hpp.

◆ key

template<typename Key >
Key LibXR::RBTree< Key >::BaseNode::key

节点键值 / Key associated with the node.

Definition at line 40 of file rbt.hpp.

◆ left

template<typename Key >
BaseNode* LibXR::RBTree< Key >::BaseNode::left = nullptr

左子节点 / Left child node.

Definition at line 42 of file rbt.hpp.

◆ parent

template<typename Key >
BaseNode* LibXR::RBTree< Key >::BaseNode::parent = nullptr

父节点 / Parent node.

Definition at line 44 of file rbt.hpp.

◆ right

template<typename Key >
BaseNode* LibXR::RBTree< Key >::BaseNode::right = nullptr

右子节点 / Right child node.

Definition at line 43 of file rbt.hpp.

◆ size

template<typename Key >
size_t LibXR::RBTree< Key >::BaseNode::size

节点大小 / Size of the node.

Definition at line 45 of file rbt.hpp.


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