GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
xt_shuffle(3) FreeBSD Library Functions Manual xt_shuffle(3)

#include <xtend/stdlib.h>
-lxtend

void    xt_shuffle(void *base, size_t nelem, size_t size)

base    Base address of the array (address of the first element)
nelem   Number of elements in the array
size    Size of one element

Shuffle an array of objects using the Fisher-Yates method, which ensures equal probability of all arrangements.

type_t  *list;
size_t  list_size = 100;
if ( (list = xt_malloc(list_size, sizeof(*list))) == NULL)
{

fprintf(stderr, "xt_malloc() failed.n");
exit(EX_UNAVAILABLE); } xt_shuffle(list, list_size, sizeof(*list));

qsort(3), heapsort(3), mergesort(3)


Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.