Show / Hide Table of Contents

    Class BinomialMaxHeap<T>

    A binomial max heap implementation.

    Inheritance
    Object
    BinomialMaxHeap<T>
    Namespace: Advanced.Algorithms.DataStructures
    Assembly: Advanced.Algorithms.dll
    Syntax
    public class BinomialMaxHeap<T> : IEnumerable<T> where T : IComparable
    Type Parameters
    Name Description
    T

    Properties

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    Methods

    ExtractMax()

    Time complexity: O(log(n)).

    Declaration
    public T ExtractMax()
    Returns
    Type Description
    T

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    IEnumerator<T>

    IncrementKey(T, T)

    Time complexity: O(log(n)).

    Declaration
    public void IncrementKey(T currentValue, T newValue)
    Parameters
    Type Name Description
    T currentValue

    The value to increment.

    T newValue

    The incremented new value.

    Insert(T)

    Time complexity: O(log(n)).

    Declaration
    public void Insert(T newItem)
    Parameters
    Type Name Description
    T newItem

    Merge(BinomialMaxHeap<T>)

    Time complexity: O(log(n)).

    Declaration
    public void Merge(BinomialMaxHeap<T> binomialHeap)
    Parameters
    Type Name Description
    BinomialMaxHeap<T> binomialHeap

    The heap to union with.

    PeekMax()

    Time complexity: O(log(n)).

    Declaration
    public T PeekMax()
    Returns
    Type Description
    T
    Back to top Generated by DocFX