Skip to content

Typed API (TypeDoc)


Typed API (TypeDoc) / IFibonacciHeap

Interface: IFibonacciHeap<E>

Defined in: heap.ts:284

Extends

Type Parameters

E

E

Properties

comparator

comparator: Comparator<E>

Defined in: index.ts:142

Comparator used for equality/sort checks.

Inherited from

ICollection.comparator


minNode

minNode: FibonacciHeapNode<E>

Defined in: heap.ts:286


rootList

rootList: FibonacciHeapNode<E>

Defined in: heap.ts:285


size

size: number

Defined in: index.ts:146

Current element count.

Inherited from

ICollection.size

Methods

add()

add(element): void

Defined in: index.ts:153

Append an element.

Parameters

element

E

Returns

void

Remarks

Complexity: Amortized O(1) unless stated otherwise.

Inherited from

ICollection.add


addAll()

addAll(collection): void

Defined in: index.ts:160

Append every element from another collection.

Parameters

collection

ICollection<E>

Returns

void

Remarks

Complexity: O(n + m) where m is collection.size.

Inherited from

ICollection.addAll


clear()

clear(): void

Defined in: index.ts:178

Remove all entries.

Returns

void

Remarks

Complexity: O(n)

Inherited from

ICollection.clear


contains()

contains(element): boolean

Defined in: heap.ts:290

Test membership using the comparator when available.

Parameters

element

E

Returns

boolean

Remarks

Complexity: O(n) worst case

Overrides

ICollection.contains


decreaseKey()

decreaseKey(node, newValue): void

Defined in: heap.ts:294

Parameters

node

FibonacciHeapNode<E>

newValue

E

Returns

void


delete()

delete(node): FibonacciHeapNode<E>

Defined in: heap.ts:292

Parameters

node

FibonacciHeapNode<E>

Returns

FibonacciHeapNode<E>


extractChildren()

extractChildren(node): CyclicDoublyLinkedList<FibonacciHeapNode<E>>

Defined in: heap.ts:307

Parameters

node

FibonacciHeapNode<E>

Returns

CyclicDoublyLinkedList<FibonacciHeapNode<E>>


extractMin()

extractMin(): FibonacciHeapNode<E>

Defined in: heap.ts:298

Returns

FibonacciHeapNode<E>


extractNeighbours()

extractNeighbours(node, includeSelf?): CyclicDoublyLinkedList<FibonacciHeapNode<E>>

Defined in: heap.ts:302

Parameters

node

FibonacciHeapNode<E>

includeSelf?

boolean

Returns

CyclicDoublyLinkedList<FibonacciHeapNode<E>>


insert()

insert(element): FibonacciHeapNode<E>

Defined in: heap.ts:288

Parameters

element

E

Returns

FibonacciHeapNode<E>


isEmpty()

isEmpty(): boolean

Defined in: index.ts:185

Check for emptiness.

Returns

boolean

true when size === 0.

Inherited from

ICollection.isEmpty


minimum()

minimum(): FibonacciHeapNode<E>

Defined in: heap.ts:296

Returns

FibonacciHeapNode<E>


remove()

remove(e, isIndex?): number | E

Defined in: index.ts:171

Remove by value or index.

Parameters

e

Element or index.

number | E

isIndex?

boolean

When true, treat e as index.

Returns

number | E

Removed element or index of removal.

Throws

If neither argument nor existing comparator are set.

Remarks

Complexity: O(n) worst case.

Inherited from

ICollection.remove


reverseIterator()

reverseIterator(): Generator<E>

Defined in: index.ts:129

Iterates elements from the most recently added to the earliest.

Returns

Generator<E>

Inherited from

ICollection.reverseIterator


sort()

sort(cmp?): void

Defined in: sort/index.ts:18

Sort the structure using the provided comparator.

Parameters

cmp?

Comparator<E>

Optional comparator; falls back to the internal one.

Returns

void

Inherited from

ICollection.sort


union()

union(heap): void

Defined in: heap.ts:300

Parameters

heap

IFibonacciHeap<E>

Returns

void

Built with VitePress – Released under the MIT License.