#include "config.h"
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
Data Structures | |
struct | stretch |
Description of current stretch. More... | |
struct | array |
Description of array. More... | |
Functions | |
void | su_smoothsort (void *base, size_t r, size_t N, int(*less)(void *m, size_t a, size_t b), void(*swap)(void *m, size_t a, size_t b)) |
Sort array using smoothsort. |
Smoothsort is a in-place sorting algorithm with performance of O(NlogN) in worst case and O(n) in best case.
void su_smoothsort | ( | void * | base, | |
size_t | r, | |||
size_t | N, | |||
int(*)(void *m, size_t a, size_t b) | less, | |||
void(*)(void *m, size_t a, size_t b) | swap | |||
) |