18#ifndef _DECAF_UTIL_RANDOM_H_
19#define _DECAF_UTIL_RANDOM_H_
40 static unsigned long long multiplier;
45 bool haveNextNextGaussian;
50 unsigned long long seed;
55 double nextNextGaussian;
173 virtual void nextBytes(std::vector<unsigned char>& buf);
200 virtual void setSeed(
unsigned long long seed);
int nextInt(int n)
Returns to the caller a new pseudo-random integer value which is uniformly distributed between 0 (inc...
double nextDouble()
Generates a normally distributed random double number between 0.0 inclusively and 1....
int nextInt()
Generates a uniformly distributed 32-bit int value from the this random number sequence.
double nextGaussian()
Pseudo-randomly generates (approximately) a normally distributed double value with mean 0....
virtual void setSeed(unsigned long long seed)
Modifies the seed using linear congruential formula presented in The Art of Computer Programming,...
virtual int next(int bits)
Answers a pseudo-random uniformly distributed int value of the number of bits specified by the argume...
long long nextLong()
Generates a uniformly distributed 64-bit int value from the this random number sequence.
bool nextBoolean()
Answers the next pseudo-random, uniformly distributed boolean value generated by this generator.
virtual void nextBytes(std::vector< unsigned char > &buf)
Modifies the byte array by a random sequence of bytes generated by this random number generator.
Random()
Construct a random generator with the current time of day in milliseconds as the initial state.
virtual void nextBytes(unsigned char *buf, int size)
Modifies the byte array by a random sequence of bytes generated by this random number generator.
Random(unsigned long long seed)
Construct a random generator with the given seed as the initial state.
float nextFloat()
Generates a normally distributed random float number between 0.0 inclusively and 1....
#define DECAF_API
Definition Config.h:29
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25