树  0.1
数据结构_第6章
Tree::binaryTree< T, Comparator >::BinNode Struct Reference

二叉链表的结点类 More...

Collaboration diagram for Tree::binaryTree< T, Comparator >::BinNode:

Public Member Functions

 BinNode (const value_type &_data=value_type{}, BinNode *_left=nullptr, BinNode *_right=nullptr)
 Construct a new Bin Node object. More...
 
 BinNode (value_type &&_data, BinNode *_left, BinNode *_right)
 Construct a new Bin Node object. More...
 
 ~BinNode ()=default
 Destroy the Bin Node object. More...
 

Public Attributes

value_type data
 数据 More...
 
BinNodeleft
 指向左child More...
 
BinNoderight
 指向右child More...
 

Detailed Description

template<typename T, typename Comparator>
struct Tree::binaryTree< T, Comparator >::BinNode

二叉链表的结点类

Definition at line 120 of file binaryTree.hh.

Constructor & Destructor Documentation

◆ BinNode() [1/2]

template<typename T , typename Comparator >
Tree::binaryTree< T, Comparator >::BinNode::BinNode ( const value_type _data = value_type{},
BinNode _left = nullptr,
BinNode _right = nullptr 
)
inlineexplicit

Construct a new Bin Node object.

Parameters
_data数据
_left左child的地址
_right右child的地址

Definition at line 133 of file binaryTree.hh.

◆ BinNode() [2/2]

template<typename T , typename Comparator >
Tree::binaryTree< T, Comparator >::BinNode::BinNode ( value_type &&  _data,
BinNode _left,
BinNode _right 
)
inlineexplicit

Construct a new Bin Node object.

Parameters
_data数据
_left左child的地址
_right右child的地址

Definition at line 142 of file binaryTree.hh.

◆ ~BinNode()

template<typename T , typename Comparator >
Tree::binaryTree< T, Comparator >::BinNode::~BinNode ( )
default

Destroy the Bin Node object.

Member Data Documentation

◆ data

template<typename T , typename Comparator >
value_type Tree::binaryTree< T, Comparator >::BinNode::data

数据

Definition at line 122 of file binaryTree.hh.

Referenced by Tree::binaryTree< T, Comparator >::clear().

◆ left

template<typename T , typename Comparator >
BinNode* Tree::binaryTree< T, Comparator >::BinNode::left

◆ right

template<typename T , typename Comparator >
BinNode* Tree::binaryTree< T, Comparator >::BinNode::right

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