random.h
Go to the documentation of this file.
1 #ifndef RANDOMH
2 #define RANDOMH
3 
4 #include "interval.h"
5 
6 
24 void randomReset();
25 
35 void randomSet(unsigned int seed);
36 
44 double randomDouble();
45 
53 double randomNormal();
54 
64 double randomInInterval(Tinterval *t);
65 
76 unsigned int randomMax(unsigned int m);
77 
89 unsigned int randomWithDistribution(unsigned int m,double s,double *d);
90 
101 void randomOnBall(double r,unsigned int k,double *p);
102 
113 void randomInBall(double r,unsigned int k,double *p);
114 
115 #endif
unsigned int randomMax(unsigned int m)
Returns a random integer in the range [0,m].
Definition: random.c:77
void randomReset()
Resets the random seed.
Definition: random.c:18
double randomNormal()
Returns a random double acording to a normal distribution.
Definition: random.c:38
unsigned int randomWithDistribution(unsigned int m, double s, double *d)
Random number with a given discrete distribution.
Definition: random.c:86
double randomDouble()
Returns a random double in the [0,1] interval.
Definition: random.c:33
double randomInInterval(Tinterval *t)
Returns a random double in the given interval.
Definition: random.c:67
void randomOnBall(double r, unsigned int k, double *p)
Random number on a k dimensional ball.
Definition: random.c:110
void randomInBall(double r, unsigned int k, double *p)
Random number in a k dimensional ball.
Definition: random.c:126
Defines a interval.
Definition: interval.h:33
Definition of the Tinterval type and the associated functions.
void randomSet(unsigned int seed)
Sets the random seed.
Definition: random.c:25