2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
21#include "../core/gimbal_decls.h"
31
32
33
34
size_t gblSearchBinary(void *pSrc, size_t elemSize, int l, int r, void *pDst, GblSortComparatorFn pFnCmp)
Performs a Binary Search over the given array, from index l to index r, returning its position.
int(* GblSortComparatorFn)(const void *, const void *)
Function taking two elements and returning their numeric difference as an integer.
void(* GblSortFn)(void *, size_t, size_t, GblSortComparatorFn)
Generic function pointer type for containing one of the array sorting algorithms.
void gblSortMerge(void *pArray, size_t count, size_t elemSize, GblSortComparatorFn pFnCmp)
Performs a Merge Sort over the given array with count elemSize elements, using pFnCmp to compare them...
void gblSortHeap(void *pArray, size_t count, size_t elemSize, GblSortComparatorFn pFnCmp)
Performs a Heap Sort over the given array with count elemSize elements, using pFnCmp to compare them.
void gblSortSelection(void *pArray, size_t count, size_t elemSize, GblSortComparatorFn pFnCmp)
Performs a Selection Sort over the given array with count elemSize elements, using pFnCmp to compare ...
void gblSortShell(void *pArray, size_t count, size_t elemSize, GblSortComparatorFn pFnCmp)
Performs a Shell Sort over the given array with count elemSize elements, using pFnCmp to compare them...
void gblSortQuick(void *pArray, size_t count, size_t elemSize, GblSortComparatorFn pFnCmp)
Performs a Quick Sort over the given array with count elemSize elements, using pFnCmp to compare them...
void gblSortInsertion(void *pArray, size_t count, size_t elemSize, GblSortComparatorFn pFnCmp)
Performs an Insertion Sort over the given array with count elemSize elements, using pFnCmp to compare...
void gblSortBubble(void *pArray, size_t count, size_t elemSize, GblSortComparatorFn pFnCmp)
Performs a Bubble Sort over the given array with count elemSize elements, using pFnCmp to compare the...
void gblSortComb(void *pArray, size_t count, size_t elemSize, GblSortComparatorFn pFnCmp)
Performs a Comb Sort over the given array with count elemSize elements, using pFnCmp to compare them.