diff --git a/csharp/Platform.Collections.Methods/Trees/SizeBalancedTreeMethods.cs b/csharp/Platform.Collections.Methods/Trees/SizeBalancedTreeMethods.cs index 8253647..4a87246 100644 --- a/csharp/Platform.Collections.Methods/Trees/SizeBalancedTreeMethods.cs +++ b/csharp/Platform.Collections.Methods/Trees/SizeBalancedTreeMethods.cs @@ -17,6 +17,12 @@ public abstract class SizeBalancedTreeMethods : SizedBinaryTreeMethods protected int attachCount = 0; const int maintainThreashold = 1; + /// + /// + /// Executes actions before attaching a node to the tree. + /// + /// + /// protected override void BeforeAttach() { attachCount++; @@ -65,6 +71,12 @@ protected override void AttachCore(ref TElement root, TElement node) } } + /// + /// + /// Executes actions after attaching a node to the tree. + /// + /// + /// protected override void AfterAttach() { if (attachCount > maintainThreashold) @@ -156,6 +168,16 @@ protected override void DetachCore(ref TElement root, TElement nodeToDetach) ClearNode(nodeToDetach); } + /// + /// + /// Maintains the balance of the left subtree to ensure size-balanced tree properties. + /// + /// + /// + /// + /// The root. + /// + /// private void LeftMaintain(ref TElement root) { if (root != TElement.Zero) @@ -193,6 +215,16 @@ private void LeftMaintain(ref TElement root) } } + /// + /// + /// Maintains the balance of the right subtree to ensure size-balanced tree properties. + /// + /// + /// + /// + /// The root. + /// + /// private void RightMaintain(ref TElement root) { if (root != TElement.Zero) diff --git a/csharp/Platform.Collections.Methods/Trees/SizedBinaryTreeMethodsBase.cs b/csharp/Platform.Collections.Methods/Trees/SizedBinaryTreeMethodsBase.cs index bdf5e30..b0604e8 100644 --- a/csharp/Platform.Collections.Methods/Trees/SizedBinaryTreeMethodsBase.cs +++ b/csharp/Platform.Collections.Methods/Trees/SizedBinaryTreeMethodsBase.cs @@ -17,7 +17,6 @@ namespace Platform.Collections.Methods.Trees /// /// /// - /// public abstract class SizedBinaryTreeMethodsBase where TElement: IUnsignedNumber, IComparisonOperators { ///