Go to the source code of this file.
Defines | |
| #define | RAND_MAX 32767 |
| #define | RS_SCALE (1.0 / (1.0 + RAND_MAX)) |
Functions | |
| double | gaussdev () |
| void | init_gaussdev () |
| double | drand () |
| int | rand_range (int nr, double *d, double low, double up, int type) |
| #define RAND_MAX 32767 |
Definition at line 42 of file gaussdev.c.
Definition at line 44 of file gaussdev.c.
Referenced by drand().
| double drand | ( | ) |
Alternative function to rand() which returns a double precision floating point number in the range of [0,1].
Definition at line 93 of file gaussdev.c.
References RS_SCALE.
Referenced by gaussdev(), rand_range(), tgoRandomParameters(), and tgoRandomParametersST().
| double gaussdev | ( | ) |
Definition at line 55 of file gaussdev.c.
References drand(), and init_gaussdev().
Referenced by pivot_lep().
| void init_gaussdev | ( | ) |
| int rand_range | ( | int | nr, |
| double * | d, | ||
| double | low, | ||
| double | up, | ||
| int | type | ||
| ) |
Fills the double array with random numbers between specified limits. Set seed for random number generator before calling this routine, for example with srand(time(NULL));
| nr | Nr of values in double array |
| d | Pointer to allocated double array |
| low | Lower limit for random values |
| up | Upper limit for random values |
| type | Distribution: 0=even, 1=square-root transformation |
Definition at line 109 of file gaussdev.c.
References drand().
1.8.0