#include <assert.h>
#include <pelib/sort.h>
#include <pelib/structure.h>
#include <pelib/stack.h>
#include <pelib/stack.c>
Go to the source code of this file.
Classes |
struct | qsort_param |
struct | qsort_next_step |
struct | qsort_bound |
Defines |
#define | STRUCT_T qsort_bound_t |
#define | STACK_T qsort_bound_t |
#define | STACK_T qsort_bound_t |
Typedefs |
typedef struct qsort_param | qsort_param_t |
typedef struct qsort_next_step | qsort_next_step_t |
typedef struct qsort_bound | qsort_bound_t |
Functions |
int pelib_copy() | qsort_bound_t (qsort_bound_t s, qsort_bound_t *d) |
int pelib_init() | qsort_bound_t (qsort_bound_t *d) |
void | pelib_insertsort_window (array_t(int)*array, int start, int stop) |
void | pelib_insertsort (array_t(int)*array) |
int | pelib_sample (array_t(int)*array, int ratio, int start, int stop) |
void | pelib_quicksort_tune (array_t(int)*array, qsort_tune_t p) |
void | pelib_quicksort_tune_recursive (array_t(int)*array, qsort_tune_t p) |
void | pelib_quicksort_window (array_t(int)*array, int start, int stop) |
void | pelib_quicksort (array_t(int)*array) |
int | pelib_mergesort (array_t(int)*array) |
int | pelib_is_increasing (array_t(int)*array) |
Define Documentation
Typedef Documentation
Function Documentation
Run insert sort on a complete array
Definition at line 128 of file sort.c.
Insert sort in a subset of an array
- Parameters:
-
a | Array to sort |
begin | Index of the first element of the subarray to run insert sort on |
end | Index of the last element of the subarray to run insert sort on |
Definition at line 106 of file sort.c.
Returns 0 if an array is not in non-decreasing order
Definition at line 431 of file sort.c.
Run quicksort on a complete array
Definition at line 403 of file sort.c.
Run quicksort with tuning parameters
Definition at line 333 of file sort.c.
Run recursive version of quicksort
Definition at line 379 of file sort.c.
Run quicksort on a subset of an array
Definition at line 390 of file sort.c.
Computes a pivot from a sample of an array
- Parameters:
-
a | Array to compute a pivot from |
size | Number of elements fo pick to compute a pivot |
start | Minimal index from which to pick samples |
stop | Maximal index from which to pick samples |
Definition at line 134 of file sort.c.