5 #ifndef __IRR_HEAPSORT_H_INCLUDED__
6 #define __IRR_HEAPSORT_H_INCLUDED__
19 while ((element<<1) < max)
47 T* virtualArray = array_ - 1;
48 s32 virtualSize = size + 2;
53 for (i=((size-1)/2); i>=0; --i)
54 heapsink(virtualArray, i+1, virtualSize-1);
57 for (i=size-1; i>0; --i)
60 array_[0] = array_[i];
Self reallocating template array (like stl vector) with additional features.
void heapsink(T *array, s32 element, s32 max)
Sinks an element into the heap.
void heapsort(T *array_, s32 size)
Sorts an array with size 'size' using heapsort.
Everything in the Irrlicht Engine can be found in this namespace.
signed int s32
32 bit signed variable.