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);
621
Array.Resize(ref
_nodes
, _size);
649
Array.Resize(ref
_nodes
, newcapacity);
35 references to _nodes
System.Collections (35)
System\Collections\Generic\PriorityQueue.cs (35)
177
public int Capacity =>
_nodes
.Length;
207
if (
_nodes
.Length == currentSize)
236
return
_nodes
[0].Element;
251
TElement element =
_nodes
[0].Element;
275
(TElement Element, TPriority Priority) root =
_nodes
[0];
285
_nodes
[0] = (element, priority);
296
_nodes
[0] = (element, priority);
319
(element, priority) =
_nodes
[0];
345
(element, priority) =
_nodes
[0];
370
(TElement Element, TPriority Priority) root =
_nodes
[0];
408
if (collection is not null && (count = collection.Count) >
_nodes
.Length - _size)
419
collection.CopyTo(
_nodes
, 0);
425
(TElement, TPriority)[] nodes =
_nodes
;
431
nodes =
_nodes
;
471
(count = collection.Count) >
_nodes
.Length - _size)
481
(TElement, TPriority)[] nodes =
_nodes
;
487
nodes =
_nodes
;
533
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
580
Array.Clear(
_nodes
, 0, _size);
599
if (
_nodes
.Length < capacity)
605
return
_nodes
.Length;
618
int threshold = (int)(
_nodes
.Length * 0.9);
631
Debug.Assert(
_nodes
.Length < minCapacity);
636
int newcapacity = GrowFactor *
_nodes
.Length;
643
newcapacity = Math.Max(newcapacity,
_nodes
.Length + MinimumGrow);
662
(TElement Element, TPriority Priority) lastNode =
_nodes
[lastNodeIndex];
675
_nodes
[lastNodeIndex] = default;
699
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
729
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
762
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
795
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
844
(TElement Element, TPriority Priority)[] nodes =
_nodes
;
885
ReadOnlySpan<(TElement Element, TPriority Priority)> nodes =
_nodes
.AsSpan(0, _size);
980
Array.Copy(_queue.
_nodes
, 0, array, index, _queue._size);
1022
_current = localQueue.
_nodes
[_index];