TPCCLIB
|
Random shuffle and related functions. More...
#include "libtpcmodel.h"
Go to the source code of this file.
Functions | |
void | random_shuffle (int *array, int n) |
void | randperm (int *array, int n, int a) |
Random shuffle and related functions.
Definition in file shuffle.c.
void random_shuffle | ( | int * | array, |
int | n ) |
Random shuffle: arrange the n elements of array in random order. Only effective if N is much smaller than RAND_MAX.
Definition at line 13 of file shuffle.c.
Referenced by randperm().
void randperm | ( | int * | array, |
int | n, | ||
int | a ) |
Random permutation: given (allocated) array of length n is filled with random permutation of numbers in the range [a:n+a-1]; that is, each number once in random order.
Definition at line 29 of file shuffle.c.