SystemEX  Lacking
Additional generic collection types missing in .net
Model

Represents a binary tree node. More...

Classes

class  SystemEx.Collections.Model.BinaryTree< T >
class  SystemEx.Collections.Model.GenericNodeIterator< T >
class  SystemEx.Collections.Model.GenericNode< T >
 Represents a generic node in the collection. More...
class  SystemEx.Collections.Model.GroupedNode< T >
class  SystemEx.Collections.Model.LinkedNodeIterrator< T >
 Random‑access iterator for intrusive LinkedNode<T> chains. More...
class  SystemEx.Collections.Model.LinkedNode< T >
 Intrusive doubly‑linked node storing a value and two directional links. More...
class  SystemEx.Collections.Model.LinkedNodeChain< T >
 Represents a chained view over multiple LinkedNodeRange<T> segments, similar to std::views::concat in C++.
A LinkedNodeChain<T> allows iteration across several disjoint ranges of a linked Node<T> structure as if they formed one continuous sequence. More...
class  SystemEx.Collections.Model.LinkedNodeRange< T >
struct  SystemEx.Collections.Model.LinkedNodeSlice< T >
class  SystemEx.Collections.Model.LinkedNodeWithSibling< T, TS >
class  SystemEx.Collections.Model.RBTreeNode< T >
 Represents a node in a red-black tree. More...

Enumerations

enum  SystemEx.Collections.Model.TraversOrder {
  SystemEx.Collections.Model.TraversOrder.Preorder , SystemEx.Collections.Model.TraversOrder.Inorder , SystemEx.Collections.Model.TraversOrder.Postorder , SystemEx.Collections.Model.TraversOrder.ListOrder ,
  SystemEx.Collections.Model.TraversOrder.ReservListOrder
}
enum  TreeColor { Red , Black }

Detailed Description

Represents a binary tree node.

Represents a node in a red-black tree, a self-balancing binary search tree.

Intrusive doubly‑linked node extended with an optional sibling link.

Represents a slice over intrusive LinkedNode<T> structures, defined by a starting iterator and a fixed length.
Conceptually similar to Span<T>, but operating on your intrusive node/iterator system instead of contiguous memory.

Represents a simple range defined by a begin and end iterator over intrusive LinkedNode<T> structures.
Conceptually similar to std::ranges::subrange, but designed specifically for your intrusive node and iterator system.

Defines the supported traversal orders for Node<T> structures.

Non‑intrusive grouped node storing a value and an expandable collection of associated GenericNode<T> instances.

Represents an iterator for traversing a generic node in the collection.

Template Parameters
TThe type of the value stored in the tree node.
Template Parameters
TThe type of the values stored in the node.

GroupedNode<T> extends GenericNode<T> with an internal dynamic array used to store auxiliary nodes that are not part of the intrusive Prev/Next chain.

This type is ideal for representing metadata collections, sibling groups, annotations, ownership histories, or secondary node clusters that must not interfere with the primary intrusive list structure.

The grouped nodes are stored in a simple Array<GenericNode<T>> and do not participate in intrusive operations such as InsertBefore, InsertAfter, Erase, Splice, or SwapWith.

Template Parameters
TThe value type stored in the underlying nodes.

var range = new NodeRange<int>(node.First(), node.At(10));

foreach (var x in range) Console.WriteLine(x);

Template Parameters
TThe value type stored in the underlying nodes.

var slice = new NodeSlice<int>(node.At(5), 10);

foreach (var x in slice) Console.WriteLine(x);

LinkedNodeWithSibling<T, TS> builds upon GenericNode<T> by adding a secondary Sibling reference. This enables auxiliary relationships between nodes that are not part of the primary intrusive list structure.

The sibling link is intentionally independent of the Prev/Next chain. It may reference:

  • A standalone GenericNode<TS> instance.
  • A node belonging to another intrusive list.
  • null, indicating no sibling association.

This type is useful for representing auxiliary metadata, cross‑links, annotations, or secondary traversal paths without modifying the primary intrusive list topology.

All standard intrusive operations (InsertBefore, InsertAfter, Erase, ReplaceWith, SwapWith, Splice, etc.) behave exactly as in LinkedNode<T> and do not affect the sibling link.

Enumeration Type Documentation

◆ TraversOrder

Enumerator
Preorder 

Visit the current node before its children and siblings.

Inorder 

Visit the left subtree, then the node, then the right subtree (not implemented).

Postorder 

Visit children and siblings before the current node.

ListOrder 

Traverse the linked list in forward direction.

ReservListOrder 

Traverse the linked list in reverse direction.

29 {
32
34 Inorder,
35
38
41
44 }
@ Inorder
Visit the left subtree, then the node, then the right subtree (not implemented).
Definition Generic/Node.cs:35
@ ListOrder
Traverse the linked list in forward direction.
Definition Generic/Node.cs:41
@ Preorder
Visit the current node before its children and siblings.
Definition Generic/Node.cs:32
@ ReservListOrder
Traverse the linked list in reverse direction.
Definition Generic/Node.cs:44
@ Postorder
Visit children and siblings before the current node.
Definition Generic/Node.cs:38

◆ TreeColor

enum SystemEx.Collections.Model.TreeColor
14 {
15 Red,
16 Black
17 }