![]() |
![]()
| ![]() |
![]()
LIBRARY#include <xtend/stdlib.h> -lxtend SYNOPSISvoid xt_shuffle(void *base, size_t nelem, size_t size) ARGUMENTSbase Base address of the array (address of the first element) nelem Number of elements in the array size Size of one element DESCRIPTIONShuffle an array of objects using the Fisher-Yates method, which ensures equal probability of all arrangements. EXAMPLEStype_t *list; size_t list_size = 100; if ( (list = xt_malloc(list_size, sizeof(*list))) == NULL) { SEE ALSOqsort(3), heapsort(3), mergesort(3)
|