2022-08-26 20:21:48 +02:00
|
|
|
namespace Ryujinx.Common.Collections
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Represents a node in the Red-Black Tree.
|
|
|
|
/// </summary>
|
|
|
|
public class IntrusiveRedBlackTreeNode<T> where T : IntrusiveRedBlackTreeNode<T>
|
|
|
|
{
|
2022-06-23 09:08:01 +02:00
|
|
|
internal bool Color = true;
|
|
|
|
internal T Left;
|
|
|
|
internal T Right;
|
|
|
|
internal T Parent;
|
2022-08-26 20:21:48 +02:00
|
|
|
|
|
|
|
public T Predecessor => IntrusiveRedBlackTreeImpl<T>.PredecessorOf((T)this);
|
|
|
|
public T Successor => IntrusiveRedBlackTreeImpl<T>.SuccessorOf((T)this);
|
|
|
|
}
|
|
|
|
}
|