Struct ScyllaSparseTriGrid<TCell>.Enumerator
Value-type enumerator for ScyllaSparseTriGrid<TCell> that yields all explicitly populated cells without heap allocation.
Inherited Members
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public struct ScyllaSparseTriGrid<TCell>.Enumerator
Remarks
The enumerator wraps the underlying Dictionary<TKey, TValue>.Enumerator
and exposes each entry as a (TriCoord Coord, TCell Value) tuple via the
Current property. Iteration order is not guaranteed. Mutating the
grid while enumeration is in progress results in undefined behaviour.
Constructors
Enumerator(Enumerator)
Initializes a new ScyllaSparseTriGrid<TCell>.Enumerator wrapping the given dictionary enumerator.
Declaration
public Enumerator(Dictionary<TriCoord, TCell>.Enumerator inner)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<TriCoord, TCell>.Enumerator | inner | The dictionary enumerator produced by the internal cell dictionary. |
Properties
Current
Gets the populated cell at the current position of the enumerator.
Declaration
public readonly (TriCoord Coord, TCell Value) Current { get; }
Property Value
| Type | Description |
|---|---|
| (TriCoord Coord, TCell Value) | A tuple of the TriCoord lane coordinate and the associated
|
Methods
MoveNext()
Advances the enumerator to the next populated cell.
Declaration
public bool MoveNext()
Returns
| Type | Description |
|---|---|
| bool |
|