Table of Contents

Class BinaryTreeNode<T>

Namespace
Garyon.DataStructures.Trees
Assembly
Garyon.dll

Represents a binary tree node, which is a component that is contained within a binary tree.

public class BinaryTreeNode<T> : BinaryTreeNode<T, BinaryTree<T>, BinaryTreeNode<T>>, ITreeNode<T, BinaryTree<T>, BinaryTreeNode<T>>, ITreeNode<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The type of the value that is stored in the node.

Inheritance
BinaryTreeNode<T>
Implements
Inherited Members
Extension Methods

Constructors

BinaryTreeNode(BinaryTreeNode<T>, BinaryTreeNode<T>, BinaryTreeNode<T>, T)

Initializes a new instance of the BinaryTreeNode<T> class with a parent and children nodes. The base tree is considered to be that of the parent.

public BinaryTreeNode(BinaryTreeNode<T> parentNode, BinaryTreeNode<T> leftChild, BinaryTreeNode<T> rightChild, T value = default)

Parameters

parentNode BinaryTreeNode<T>

The parent node.

leftChild BinaryTreeNode<T>

The left child node.

rightChild BinaryTreeNode<T>

The right child node.

value T

The value of the node.

BinaryTreeNode(BinaryTreeNode<T>, T)

Initializes a new instance of the BinaryTreeNode<T> class with a parent node, but no children nodes. The base tree is considered to be that of the parent.

public BinaryTreeNode(BinaryTreeNode<T> parentNode, T value = default)

Parameters

parentNode BinaryTreeNode<T>

The parent node.

value T

The value of the node.

BinaryTreeNode(BinaryTree<T>, T)

Initializes a new instance of the BinaryTreeNode<T> class with a base tree, but no parent or children nodes.

public BinaryTreeNode(BinaryTree<T> baseTree, T value = default)

Parameters

baseTree BinaryTree<T>

The base tree that contains this node.

value T

The value of the node.

BinaryTreeNode(T)

Initializes a new instance of the BinaryTreeNode<T> class with no base tree, parent or children nodes.

public BinaryTreeNode(T value = default)

Parameters

value T

The value of the node.

Methods

InitializeNewNode(BinaryTreeNode<T>, T)

Initializes a new instance of the TreeNode<T> class with a parent node. The base tree is considered to be that of the parent.

protected override BinaryTreeNode<T> InitializeNewNode(BinaryTreeNode<T> parentNode, T value = default)

Parameters

parentNode BinaryTreeNode<T>

The parent node.

value T

The value of the node.

Returns

BinaryTreeNode<T>

InitializeNewNode(BinaryTree<T>, T)

Initializes a new instance of the TreeNode<T> class with a base tree, but no parent node.

protected override BinaryTreeNode<T> InitializeNewNode(BinaryTree<T> baseTree, T value = default)

Parameters

baseTree BinaryTree<T>

The base tree that contains this node.

value T

The value of the node.

Returns

BinaryTreeNode<T>

InitializeNewNode(T)

Initializes a new instance of the TreeNode<T> class with no base tree or parent node.

protected override BinaryTreeNode<T> InitializeNewNode(T value = default)

Parameters

value T

The value of the node.

Returns

BinaryTreeNode<T>