Table of Contents

Interface IReadOnlyHeap<T>

Namespace
LfrlAnvil.Collections
Assembly
LfrlAnvil.Collections.dll

Represents a read-only generic heap data structure.

public interface IReadOnlyHeap<T> : IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

Value type.

Inherited Members
Extension Methods

Properties

Comparer

Entry comparer.

IComparer<T> Comparer { get; }

Property Value

IComparer<T>

Methods

Peek()

Returns an entry currently at the top of this heap.

[Pure]
T Peek()

Returns

T

Entry currently at the top of this heap.

Exceptions

IndexOutOfRangeException

When this heap is empty.

TryPeek(out T)

Attempts to return an entry currently at the top of this heap if it is not empty.

bool TryPeek(out T result)

Parameters

result T

out parameter that returns an entry currently at the top of the heap.

Returns

bool

true when this heap is not empty, otherwise false.