Constructors
constructor
- new HeapSort<T>(comparator: (a: T, b: T) => number): HeapSort<T>
-
Type parameters
Parameters
-
comparator: (a: T, b: T) => number
-
-
Parameters
Returns number
Properties
Private largest
largest: number = 0
Private left
left: number = 0
Private right
right: number = 0
Private tmp
tmp: null | T = null
Methods
Private exchange
- exchange(a: T[], i: number, j: number): void
-
Parameters
-
a: T[]
-
i: number
-
j: number
Returns void
Private maxHeap
- maxHeap(a: T[], i: number): void
https://github.com/G43riko/JavaUtils/blob/master/GLib/src/glib/sorts/GHeapSort.java