Class BinarySearchTreeNode<T>
- Namespace
- Garyon.DataStructures.Trees
- Assembly
- Garyon.dll
Represents a tree node, which is a component that is contained within a tree.
public class BinarySearchTreeNode<T> : BinarySearchTreeNode<T, BinarySearchTree<T>, BinarySearchTreeNode<T>>, ITreeNode<T, BinarySearchTree<T>, BinarySearchTreeNode<T>>, ITreeNode<T>, IEnumerable<T>, IEnumerable where T : IComparable<T>
Type Parameters
TThe type of the value that is stored in the node.
- Inheritance
-
BinarySearchTreeNode<T>
- Implements
-
ITreeNode<T>IEnumerable<T>
- Inherited Members
- Extension Methods
Constructors
BinarySearchTreeNode(BinarySearchTreeNode<T>, BinarySearchTreeNode<T>, BinarySearchTreeNode<T>, T)
Initializes a new instance of the BinarySearchTreeNode<T> class with a parent and children nodes. The base tree is considered to be that of the parent.
public BinarySearchTreeNode(BinarySearchTreeNode<T> parentNode, BinarySearchTreeNode<T> child1, BinarySearchTreeNode<T> child2, T value = default)
Parameters
parentNodeBinarySearchTreeNode<T>The parent node.
child1BinarySearchTreeNode<T>The first child node.
child2BinarySearchTreeNode<T>The second child node.
valueTThe value of the node.
BinarySearchTreeNode(BinarySearchTreeNode<T>, T)
Initializes a new instance of the BinarySearchTreeNode<T> class with a parent node, but no children nodes. The base tree is considered to be that of the parent.
public BinarySearchTreeNode(BinarySearchTreeNode<T> parentNode, T value = default)
Parameters
parentNodeBinarySearchTreeNode<T>The parent node.
valueTThe value of the node.
BinarySearchTreeNode(BinarySearchTree<T>, T)
Initializes a new instance of the BinarySearchTreeNode<T> class with a base tree, but no parent or children nodes.
public BinarySearchTreeNode(BinarySearchTree<T> baseTree, T value = default)
Parameters
baseTreeBinarySearchTree<T>The base tree that contains this node.
valueTThe value of the node.
BinarySearchTreeNode(T)
Initializes a new instance of the BinarySearchTreeNode<T> class with no base tree, parent or children nodes.
public BinarySearchTreeNode(T value = default)
Parameters
valueTThe value of the node.
Methods
InitializeNewNode(BinarySearchTreeNode<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 BinarySearchTreeNode<T> InitializeNewNode(BinarySearchTreeNode<T> parentNode, T value = default)
Parameters
parentNodeBinarySearchTreeNode<T>The parent node.
valueTThe value of the node.
Returns
InitializeNewNode(BinarySearchTree<T>, T)
Initializes a new instance of the TreeNode<T> class with a base tree, but no parent node.
protected override BinarySearchTreeNode<T> InitializeNewNode(BinarySearchTree<T> baseTree, T value = default)
Parameters
baseTreeBinarySearchTree<T>The base tree that contains this node.
valueTThe value of the node.
Returns
InitializeNewNode(T)
Initializes a new instance of the TreeNode<T> class with no base tree or parent node.
protected override BinarySearchTreeNode<T> InitializeNewNode(T value = default)
Parameters
valueTThe value of the node.