Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PairingHeap<T>

Type parameters

  • T

Hierarchy

  • PairingHeap

Index

Constructors

constructor

  • Parameters

    • elem: T

    Returns PairingHeap

Properties

Private subheaps

subheaps: PairingHeap[]<T>

Methods

contains

  • Parameters

    Returns boolean

count

  • count(): number
  • Returns number

decreaseKey

  • decreaseKey(subheap: PairingHeap<T>, newValue: T, setHeapNode: function, lessThan: function): PairingHeap<T>
  • Parameters

    • subheap: PairingHeap<T>
    • newValue: T
    • setHeapNode: function
    • lessThan: function
        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns PairingHeap<T>

empty

  • empty(): boolean
  • Returns boolean

forEach

  • forEach(f: any): void
  • Parameters

    • f: any

    Returns void

insert

  • Parameters

    • obj: T
    • lessThan: any

    Returns PairingHeap<T>

isHeap

  • isHeap(lessThan: function): boolean
  • Parameters

    • lessThan: function
        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns boolean

merge

mergePairs

  • Parameters

    • lessThan: function
        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns PairingHeap<T>

min

  • min(): T
  • Returns T

removeMin

  • Parameters

    • lessThan: function
        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns PairingHeap<T>

toString

  • toString(selector: any): string
  • Parameters

    • selector: any

    Returns string

Generated using TypeDoc