Search Results for

    Show / Hide Table of Contents

    Class FixedSizeMinHeap<TKey>

    Inheritance
    object
    FixedSizeMinHeap<TKey>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Tenray.ZoneTree.Collections
    Assembly: ZoneTree.dll
    Syntax
    public sealed class FixedSizeMinHeap<TKey>
    Type Parameters
    Name Description
    TKey

    Constructors

    | Improve this Doc View Source

    FixedSizeMinHeap(int, IRefComparer<TKey>)

    Declaration
    public FixedSizeMinHeap(int maximumSize, IRefComparer<TKey> comparer)
    Parameters
    Type Name Description
    int maximumSize
    IRefComparer<TKey> comparer

    Properties

    | Improve this Doc View Source

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    | Improve this Doc View Source

    Keys

    Declaration
    public ReadOnlySpan<TKey> Keys { get; }
    Property Value
    Type Description
    ReadOnlySpan<TKey>
    | Improve this Doc View Source

    MinValue

    Declaration
    public TKey MinValue { get; }
    Property Value
    Type Description
    TKey
    | Improve this Doc View Source

    Size

    Declaration
    public int Size { get; }
    Property Value
    Type Description
    int

    Methods

    | Improve this Doc View Source

    Clear()

    Declaration
    public void Clear()
    | Improve this Doc View Source

    Insert(in TKey)

    Inserts the new element, maintaining the heap property.

    If the element is greater than the current min element, this function returns false without modifying the heap. Otherwise, it returns true.

    Declaration
    public bool Insert(in TKey key)
    Parameters
    Type Name Description
    TKey key
    Returns
    Type Description
    bool

    true if inserted

    | Improve this Doc View Source

    RemoveMin()

    Declaration
    public void RemoveMin()
    | Improve this Doc View Source

    ReplaceMin(TKey)

    Replaces the minimum value in the heap with the user-provided value, and restores the heap property.

    Declaration
    public void ReplaceMin(TKey newKey)
    Parameters
    Type Name Description
    TKey newKey
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 Tenray.io