5 #ifndef __IRR_HEAPSORT_H_INCLUDED__ 6 #define __IRR_HEAPSORT_H_INCLUDED__ 19 while ((element<<1) < max)
47 T* virtualArray = array_ - 1;
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];
void heapsink(T *array, s32 element, s32 max)
Sinks an element into the heap.
Everything in the Irrlicht Engine can be found in this namespace.
signed int s32
32 bit signed variable.
void heapsort(T *array_, s32 size)
Sorts an array with size 'size' using heapsort.
Self reallocating template array (like stl vector) with additional features.