Show / Hide Table of Contents

    Class FibornacciMaxHeap<T>

    A fibornacci max heap implementation.

    Inheritance
    Object
    FibornacciMaxHeap<T>
    Namespace: Advanced.Algorithms.DataStructures
    Assembly: Advanced.Algorithms.dll
    Syntax
    public class FibornacciMaxHeap<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)

    Update the Heap with new value for this node pointer. Time complexity: O(1).

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

    Insert(T)

    Time complexity: O(1).

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

    Merge(FibornacciMaxHeap<T>)

    Unions this heap with another. Time complexity: O(1).

    Declaration
    public void Merge(FibornacciMaxHeap<T> FibornacciHeap)
    Parameters
    Type Name Description
    FibornacciMaxHeap<T> FibornacciHeap

    PeekMax()

    Time complexity: O(1).

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