diff options
Diffstat (limited to 'Ryujinx.Common/Collections/IntrusiveRedBlackTreeNode.cs')
| -rw-r--r-- | Ryujinx.Common/Collections/IntrusiveRedBlackTreeNode.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Ryujinx.Common/Collections/IntrusiveRedBlackTreeNode.cs b/Ryujinx.Common/Collections/IntrusiveRedBlackTreeNode.cs new file mode 100644 index 00000000..c6c01a06 --- /dev/null +++ b/Ryujinx.Common/Collections/IntrusiveRedBlackTreeNode.cs @@ -0,0 +1,16 @@ +namespace Ryujinx.Common.Collections +{ + /// <summary> + /// Represents a node in the Red-Black Tree. + /// </summary> + public class IntrusiveRedBlackTreeNode<T> where T : IntrusiveRedBlackTreeNode<T> + { + public bool Color = true; + public T Left; + public T Right; + public T Parent; + + public T Predecessor => IntrusiveRedBlackTreeImpl<T>.PredecessorOf((T)this); + public T Successor => IntrusiveRedBlackTreeImpl<T>.SuccessorOf((T)this); + } +}
\ No newline at end of file |
