Search / Sort
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#ifndef INCLUDED_C_KNUTHSHUFFLE_H
|
||||
#define INCLUDED_C_KNUTHSHUFFLE_H
|
||||
|
||||
#ifndef INCLUDED_C_TYPES_H
|
||||
#include <c_Types.h>
|
||||
#endif /*INCLUDED_C_TYPES_H*/
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* */
|
||||
|
||||
/**
|
||||
* @brief 工业级泛型 Knuth (Fisher-Yates) 乱序/洗牌算法
|
||||
*
|
||||
* @param base 指向待洗牌的连续数组首元素的指针
|
||||
* @param num 数组中元素的总个数
|
||||
* @param size 每个元素所占用的内存字节大小 (sizeof)
|
||||
*/
|
||||
void c_KnuthShuffle(void* base, c_size_t num, c_size_t size);
|
||||
|
||||
#endif /*INCLUDED_C_KNUTHSHUFFLE_H*/
|
||||
Reference in New Issue
Block a user