12#include "tpcclibConfig.h"
27#define TPCCLIB_MERTWI_NN 312
29#define TPCCLIB_MERTWI_A UINT64_C(0xB5026F5AA96619E9)
69extern unsigned int drandSeed(
short int seed);
71extern int drandRange(
unsigned int nr,
double *d,
double low,
double up,
int type);
86extern int haltonElement(
const int i,
const int dim,
double *r);
uint64_t mt[TPCCLIB_MERTWI_NN]
Header file for library libtpcextensions.
int drandRange(unsigned int nr, double *d, double low, double up, int type)
int mertwiRandomBetween(MERTWI *mt, unsigned int nr, double *d, double low, double up, int type)
Fill the given double array with random numbers with uniform distribution between the specified limit...
#define TPCCLIB_MERTWI_NN
uint64_t mertwiRandomInt64(MERTWI *mt)
Generate a random number on [0, 2^64-1]-interval using Mersenne Twister MT19937.
double drandExponential(double mean)
Get pseudo-random number with exponential distribution.
void randomShuffle(int *array, unsigned int n, MERTWI *mt)
Random shuffle.
void mertwiInitWithSeed64(MERTWI *mt, uint64_t seed)
Initialize the state vector mt[] inside data structure for Mersenne Twister MT19937 pseudo-random num...
double mertwiRandomDouble1(MERTWI *mt)
Generate a 64-bit double precision floating point pseudo-random number in the range of [0,...
int haltonElement(const int i, const int dim, double *r)
Calculation of an element of quasi-random low-discrepancy Halton sequence.
void mertwiInitByArray64(MERTWI *mt, uint64_t init_key[], uint64_t key_length)
Initialize the state vector mt[] inside data structure for Mersenne Twister MT19937 pseudo-random num...
double mertwiRandomGaussian(MERTWI *mt)
Generate a 64-bit double precision floating point pseudo-random number with normal (Gaussian) distrib...
double mertwiRandomExponential(MERTWI *mt, double mean)
Generate pseudo-random number with exponential distribution and specified mean.
void randomPermutationUnsigned(unsigned int *array, unsigned int n, unsigned int a, MERTWI *mt)
Random permutation for an array of unsigned integers.
int haltonPrime(const int N)
Subfunction for calculation of quasi-random Halton sequence.
uint64_t mertwiSeed64(void)
Make uint64_t seed for pseudo-random number generators.
void randomShuffleUnsigned(unsigned int *array, unsigned int n, MERTWI *mt)
Random shuffle.
void randomPermutation(int *array, unsigned int n, int a, MERTWI *mt)
Random permutation for an array of signed integers.
double mertwiRandomDouble2(MERTWI *mt)
Generate a 64-bit double precision floating point pseudo-random number in the range of [0,...
double drandGaussian()
Get pseudo-random number with normal (Gaussian) distribution with mean 0 and SD 1.
void mertwiInit(MERTWI *mt)
int64_t mertwiRandomInt63(MERTWI *mt)
Generate a random number on [0, 2^63-1]-interval using Mersenne Twister MT19937.
double mertwiRandomDouble3(MERTWI *mt)
Generate a 64-bit double precision floating point pseudo-random number in the range of (0,...
uint32_t mertwiSeed32(void)
Make uint32_t seed for pseudo-random number generators.
unsigned int drandSeed(short int seed)
Make and optionally set the seed for rand(), drand, drandRange, and drandGaussian().