Search / Sort
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#ifndef INCLUDED_C_INSERTIONSORT_H
|
||||
#define INCLUDED_C_INSERTIONSORT_H
|
||||
|
||||
|
||||
#ifndef INCLUDED_C_SORTCOMPARE_H
|
||||
#include <c_SortCompare.h>
|
||||
#endif /*INCLUDED_C_SORTCOMPARE_H*/
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* */
|
||||
|
||||
/**
|
||||
* @brief 工业级泛型插入排序(稳定排序,完全规避无符号整数下溢)
|
||||
*
|
||||
* @param base 指向待排序连续数组首元素的指针
|
||||
* @param num 数组中元素的总个数
|
||||
* @param size 每个元素所占用的内存字节大小 (sizeof)
|
||||
* @param cmp 比对回调函数指针 (不能为 NULL)
|
||||
* @param args 比对时的参数
|
||||
*/
|
||||
void c_InsertionSort(void* base, c_size_t num, c_size_t size, c_SortCompare_t cmp, void* args);
|
||||
|
||||
#endif /*INCLUDED_C_INSERTIONSORT_H*/
|
||||
Reference in New Issue
Block a user