Craig's Utility Library  4.0 Beta
Utilities.DataTypes.TreeNode< T > Class Template Reference

Node class for the Binary tree More...

Public Member Functions

 TreeNode (T value=default(T), TreeNode< T > parent=null, TreeNode< T > left=null, TreeNode< T > right=null)
 Constructor More...
 
override string ToString ()
 Returns the node as a string More...
 

Properties

virtual bool IsLeaf [get]
 Is this a leaf More...
 
virtual bool IsRoot [get]
 Is this the root More...
 
virtual TreeNode< T > Left [get, set]
 Left node More...
 
virtual TreeNode< T > Parent [get, set]
 Parent node More...
 
virtual TreeNode< T > Right [get, set]
 Right node More...
 
virtual T Value [get, set]
 Value of the node More...
 

Detailed Description

Node class for the Binary tree

Template Parameters
TThe value type

Definition at line 342 of file BTree.cs.

Constructor & Destructor Documentation

Utilities.DataTypes.TreeNode< T >.TreeNode ( value = default(T),
TreeNode< T >  parent = null,
TreeNode< T >  left = null,
TreeNode< T >  right = null 
)

Constructor

Parameters
valueValue of the node
parentParent node
leftLeft node
rightRight node

Definition at line 351 of file BTree.cs.

Member Function Documentation

override string Utilities.DataTypes.TreeNode< T >.ToString ( )

Returns the node as a string

Returns
String representation of the node

Definition at line 398 of file BTree.cs.

Property Documentation

virtual bool Utilities.DataTypes.TreeNode< T >.IsLeaf
get

Is this a leaf

Definition at line 362 of file BTree.cs.

virtual bool Utilities.DataTypes.TreeNode< T >.IsRoot
get

Is this the root

Definition at line 367 of file BTree.cs.

virtual TreeNode<T> Utilities.DataTypes.TreeNode< T >.Left
getset

Left node

Definition at line 372 of file BTree.cs.

virtual TreeNode<T> Utilities.DataTypes.TreeNode< T >.Parent
getset

Parent node

Definition at line 377 of file BTree.cs.

virtual TreeNode<T> Utilities.DataTypes.TreeNode< T >.Right
getset

Right node

Definition at line 382 of file BTree.cs.

virtual T Utilities.DataTypes.TreeNode< T >.Value
getset

Value of the node

Definition at line 387 of file BTree.cs.


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