6 writes to _nodes
System.Collections (6)
System\Collections\Generic\PriorityQueue.cs (6)
71
_nodes
= Array.Empty<(TElement, TPriority)>();
98
_nodes
= Array.Empty<(TElement, TPriority)>();
118
_nodes
= new (TElement, TPriority)[initialCapacity];
160
_nodes
= EnumerableHelpers.ToArray(items, out _size);
616
Array.Resize(ref
_nodes
, _size);
644
Array.Resize(ref
_nodes
, newcapacity);
34 references to _nodes
System.Collections (34)
System\Collections\Generic\PriorityQueue.cs (34)
202
if (
_nodes
.Length == currentSize)
231
return
_nodes
[0].Element;
246
TElement element =
_nodes
[0].Element;
270
(TElement Element, TPriority Priority) root =
_nodes
[0];
280
_nodes
[0] = (element, priority);
291
_nodes
[0] = (element, priority);
314
(element, priority) =
_nodes
[0];
340
(element, priority) =
_nodes
[0];
365
(TElement Element, TPriority Priority) root =
_nodes
[0];
403
if (collection is not null && (count = collection.Count) >
_nodes
.Length - _size)
414
collection.CopyTo(
_nodes
, 0);
420
(TElement, TPriority)[] nodes =
_nodes
;
426
nodes =
_nodes
;
466
(count = collection.Count) >
_nodes
.Length - _size)
476
(TElement, TPriority)[] nodes =
_nodes
;
482
nodes =
_nodes
;
528
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
575
Array.Clear(
_nodes
, 0, _size);
594
if (
_nodes
.Length < capacity)
600
return
_nodes
.Length;
613
int threshold = (int)(
_nodes
.Length * 0.9);
626
Debug.Assert(
_nodes
.Length < minCapacity);
631
int newcapacity = GrowFactor *
_nodes
.Length;
638
newcapacity = Math.Max(newcapacity,
_nodes
.Length + MinimumGrow);
657
(TElement Element, TPriority Priority) lastNode =
_nodes
[lastNodeIndex];
670
_nodes
[lastNodeIndex] = default;
694
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
724
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
757
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
790
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
839
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
880
ReadOnlySpan<(TElement Element, TPriority Priority)> nodes =
_nodes
.AsSpan(0, _size);
975
Array.Copy(_queue.
_nodes
, 0, array, index, _queue._size);
1017
_current = localQueue.
_nodes
[_index];