A lowโlevel extension framework for .NET providing STLโstyle iterators, traversal interfaces, randomโaccess iteration, advanced generic data structures, fixedโsize buffers, maps, multimaps, and a modular cache/RAID subsystem.
Designed for deterministic, highโperformance, byteโlevel applications without external dependencies.
โจ Overview
This library extends the .NET collection ecosystem with:
- Iterator interfaces inspired by C++ STL
- Generic algorithms (Distance, Find, LowerBound, Reverse, Rotate, etc.)
- Advanced collection types (Map, MultiMap, SortedMap, Deque, Queue, Stack, Array, FixedArray, FixedMap)
- Nodeโbased traversal structures
- Deterministic, fixedโsize memory containers
- Cache and RAIDโstyle memory layouts
- Utility modules for comparison, endianโaware random, bit operations, and layout validation
All components are allocationโcontrolled, predictable, and engineโoriented.
๐ฆ Installation
NuGet
dotnet add package RoseLeDark.Collections.Missings
Manual
- Clone the repository
- Add the project reference
- Import the namespaces:
Definition Algorithm.cs:22
๐งฉ Iterator System
The library provides a full iterator hierarchy:
- ITerator<T>
- IForwardIterator<T>
- IBidirectionalIterator<T>
- IRandomAccessIterator<T>
- Nodeโbased iterators for tree and list structures
These iterators support:
- Forward(), Back(), Advance(n)
- Clone() for safe traversal
- Current element access
- IsBegin, IsEnd
- Structural traversal via Node, NodeChain, NodeRange, NodeSlice, GroupNode, StarNode
๐งฎ Generic Algorithms
Located under SystemEx.Utils.Iterator and SystemEx.Utils:
- Distance(first, last)
- Find(first, last, value, cmp)
- LowerBound(first, last, value, cmp)
- UpperBound(first, last, value, cmp)
- Reverse(first, last)
- Rotate(first, middle, last)
- ForEach(first, last, action)
- Swap, Fill, FillN
- Copy, Move
- Min, Max, Clamp
- MinElement, MaxElement, MinMaxElement
- LexicographicalCompare
These algorithms behave similarly to STL equivalents, but are implemented in pure C# with zero allocations.
๐ Collections
Core Types
- Vector<T>
- FixedVector<T>
- Deque<T>
- Queue<T>
- Stack<T>
- BinQueue<T>
- Set<T>
- MultiSet<T>
- UnorderedMultiSet<T>
- UnorderedSet<T>
Map System
- Map<TKey, TValue>
- MultiMap<TKey, TValue>
- SortedMap<TKey, TValue>
- FixedMap<TKey, TValue>
- IMap, ISortedMap, INode, ITraverse
Tuple & Pair Types
- ITuple
- Pair<T1, T2> : ITuple
- Triple<T1, T2, T3> : ITuple
- Quad<T1, T2, T3, T4> : ITuple
- Tuple : ITuple
- TupleList<T> where T : ITuple
๐งฑ Cache & RAID Subsystem (Future Release)
- Cache
- CacheMirrored
- CacheStripped
These provide deterministic, fixedโsize memory layouts suitable for:
- engine subsystems
- device memory staging
- zeroโcopy pipelines
- shared memory regions
๐ Utilities
Located under SystemEx.Utils:
- BitUtils
- Layout (struct layout validation)
- Random (endianโaware random generation)
- Utils (general helpers)
- CompareResult + CompFunc<T>
๐ Project Structure
SystemEx/
โโ Device/ [ namespace SystemEx.Device ]
โ โโ IKernel.cs
โ โโ RamKernel.cs
โ โโ Interop/ [ namespace SystemEx.Device.Interop ]
โ โ โโ IDeviceSharedBackend.cs
โ โ โโ RamKernelLoader.cs
โ โ โโ RamSharedBackend.cs
โ โโ Memory/
โ โโ DeviceBuffer.cs
โ โโ DeviceSharedBuffer.cs
โโ Base [ namespace SystemEx ]
โ โโ Buffer.cs
โ โโ FlexSpan.cs
โ โโ IComparableEx.cs
โ โโ IRange.cs
โ โโ Math.cs
โ โโ NumberRange.cs
โ โโ NumberRangeIterrator.cs
โ โโ NumberRangeStepper.cs
โ โโTriple.cs
โโ Collections/
โ โโ Generic/ [ namespace SystemEx.Collections.Generic ]
โ โโ Vector.cs
โ โโ BinQueue.cs
โ โโ Cache.cs
โ โโ Cluster.cs
| โโ ContainerFlexSpan.cs
โ โโ Deque.cs
โ โโ Find.cs
โ โโ FixedVector.cs
โ โโ FixedMap.cs
โ โโ GroupNode.cs
โ โโ Map.cs
โ โโ MirroredCache.cs
โ โโ MultiMap.cs
โ โโ MultiSet.cs
โ โโ MultiTupleMap.cs
โ โโ Node.cs
โ โโ NodeChain.cs
โ โโ NodeRange.cs
โ โโ NodeSlice.cs
โ โโ Pair.cs
โ โโ PriorityQueue.cs
โ โโ Quad.cs
โ โโ Queue.cs
โ โโ Set.cs
โ โโ SortedMap.cs
โ โโ SortedMultiMap.cs
โ โโ SortedMultiTupleMap.cs
โ โโ SortedTupleList.cs
โ โโ SortedTupleMap.cs
โ โโ Stack.cs
โ โโ StarNode.cs
โ โโ StrippedCache.cs
โ โโ Triple.cs
โ โโ Tuple.cs
โ โโ TupleMap.cs
โ โโ TypeBuffer.cs
โ โโ TupleList.cs
โโ Drawing/ [ namespace SystemEx.Drawing ]
| โโ Canvas.cs
| โโ ColorHDR.cs
| โโ ColorHSV.cs
| โโ ColorR8G8B8.cs
| โโ ColorR10G10B10.cs
| โโ ColorR16G16B16.cs
| โโ ... CMY, NCol, XYZ, YUV
| โโ Light.cs
| โโ Colors.cs
โโ IO/ [ namespace SystemEx.IO ]
| โโ CachStream.cs
| โโ WriteStream.cs
โโ Random/ [ namespace SystemEx.Random ]
| โโ Isaac32Engine.cs
| โโ Randx.cs
โโ Numeric/ [ namespace SystemEx.Numeric ]
| โโ vec{2,3,4]f.cs
| โโ vec{2,3,4]d.cs
| โโ vec{2,3,4]i.cs
| โโ quadf.cs
| โโ quadd.cs
| โโ m44f.cs
| โโ m44d.cs
| โโ DQuadv.cs
| โโ AxisAngle.cs
| โโ Projection.cs
โโ Utils/ [ namespace SystemEx.Utils ]
โ โโ Algorithm.cs
โ โโ BitUtils.cs
โ โโ Conversion.cs
โ โโ Layout.cs
โ โโ Random.cs
โโ LICENSE.md
โโ CHANGELOG.md
โโ RoseLeDark.Collections.Missings.png
โโ RoseLeDark.Collections.Missings.svg
โโ README.md
๐ License
Licensed under the European Union Public Licence (EUPL) v1.2.
See the LICENSE.md file for details.
๐ง Status
Active development.
More iterator types, algorithms, and data structures will be added as needed.