random.c
Go to the documentation of this file.
82 return((unsigned int)floor(randomDouble()*(m+1))); /* in [0,m+1) -> all values in 0,m have same chances */
double randomInInterval(Tinterval *t) Returns a random double in the given interval. Definition: random.c:67 unsigned int randomWithDistribution(unsigned int m, double s, double *d) Random number with a given discrete distribution. Definition: random.c:86 double randomNormal() Returns a random double acording to a normal distribution. Definition: random.c:38 unsigned int randomMax(unsigned int m) Returns a random integer in the range [0,m]. Definition: random.c:77 void randomInBall(double r, unsigned int k, double *p) Random number in a k dimensional ball. Definition: random.c:126 void randomOnBall(double r, unsigned int k, double *p) Random number on a k dimensional ball. Definition: random.c:110 Definition of basic randomization functions. |
Follow us!