Friflo.Engine.ECS.Index.md

December 3, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.Index Namespace

Enables search for indexed component values in O(1) for types: string, int, enum, float, Guid, DateTime, ... .
Support efficient entity relationships like entity links (foreign keys) and back links (JOIN's).

Classes
AbstractComponentIndexBase class to enable implementing a custom component index.
A custom component index can be implemented to optimize indexing or component queries for a specific component type.
ComponentIndexAttributeAssigns a custom AbstractComponentIndex to an attributed component type.
GenericComponentIndex<TValue>Generic base class required to implement a custom component index.
RangeIndex<TIndexedComponent,TValue>A component index optimized to execute range queries in O(log N) at the cost of index updates in O(log N).
The default index executes in O(1) when adding, removing or updating indexed component values.