Go to the source code of this file.
|
void | heapsort (int *sort_index, float *sort_values, int nelem, int start_index) |
|
void heapsort |
( |
int * |
sort_index, |
|
|
float * |
sort_values, |
|
|
int |
nelem, |
|
|
int |
start_index |
|
) |
| |
Definition at line 13 of file heapsort.c.
21 sort_index -= start_index;
22 sort_values -= start_index;
26 for (i = 1; i <= nelem; i++)
34 for (i = nelem; i >= 1; i--)
38 sort_index += start_index;
39 sort_values += start_index;
static void add_to_sort_heap(int *heap, float *sort_values, int index, int heap_tail)
static int get_top_of_heap_index(int *heap, float *sort_values, int heap_tail, int start_index)