Struct ScyllaAdjacencyListGraph.NodeEnumerator
Value-type enumerator for iterating over all ScyllaGraphNode entries
in the graph. Using the concrete ScyllaAdjacencyListGraph.NodeEnumerator type instead of
IEnumerator<ScyllaGraphNode> avoids heap allocation when used in a
foreach loop on the concrete ScyllaAdjacencyListGraph type.
Inherited Members
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public struct ScyllaAdjacencyListGraph.NodeEnumerator
Constructors
NodeEnumerator(ScyllaMap<int, ScyllaGraphNode>)
Initializes a new ScyllaAdjacencyListGraph.NodeEnumerator that iterates over the nodes in the provided map.
Declaration
public NodeEnumerator(ScyllaMap<int, ScyllaGraphNode> nodes)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaMap<int, ScyllaGraphNode> | nodes | The ScyllaMap<TKey, TValue> that backs the graph's node store. |
Properties
Current
Gets the ScyllaGraphNode at the current enumerator position.
The value is undefined if MoveNext() has not been called or
returned false.
Declaration
public ScyllaGraphNode Current { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaGraphNode |
Methods
Dispose()
Disposes the enumerator. This is a no-op because the enumerator holds no unmanaged resources.
Declaration
public void Dispose()
MoveNext()
Advances the enumerator to the next node in the graph.
Declaration
public bool MoveNext()
Returns
| Type | Description |
|---|---|
| bool |
|
Reset()
Resets the enumerator to before the first element. Not supported.
Declaration
public void Reset()
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Always thrown. Create a new enumerator instead. |