-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from Visionaid-International-Ltd/refactor-rbtree
Refactor RBTree
- Loading branch information
Showing
4 changed files
with
120 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
|
||
namespace RedBlackTree | ||
{ | ||
public enum Color | ||
{ | ||
RED = 0, | ||
BLACK = 1 | ||
} | ||
|
||
/// <summary> | ||
/// Red Black Node interface | ||
/// </summary> | ||
// TODO: Make concrete class in v3 | ||
public interface IRBNode : IComparable | ||
{ | ||
IRBNode Left { get; set; } | ||
|
||
IRBNode Right { get; set; } | ||
|
||
Color Color { get; set; } | ||
|
||
IRBNode Parent { get; set; } | ||
|
||
IRBNode Grandparent(); | ||
|
||
IRBNode Sibling(); | ||
|
||
IRBNode Uncle(); | ||
|
||
void AssignValueTo(IRBNode other); | ||
} | ||
} |
Oops, something went wrong.