| 8 |
|
extern "C" { |
| 9 |
|
#endif |
| 10 |
|
|
| 11 |
– |
|
| 12 |
– |
#include "copyright.h" |
| 13 |
– |
|
| 11 |
|
#ifdef NORANDOM |
| 12 |
|
|
| 13 |
|
#undef random |
| 18 |
|
#define urand(i) 0.5 |
| 19 |
|
#define initurand(n) (n) |
| 20 |
|
|
| 21 |
< |
#else |
| 21 |
> |
#else /* ! NORANDOM */ |
| 22 |
|
|
| 23 |
|
#ifdef _WIN32 |
| 24 |
|
|
| 55 |
|
#define urand(i) frandom() |
| 56 |
|
#define initurand(n) (n) |
| 57 |
|
|
| 58 |
< |
#else |
| 58 |
> |
#else /* ! MC */ |
| 59 |
|
|
| 60 |
|
extern unsigned short *urperm; |
| 61 |
|
extern int urmask; |
| 62 |
|
|
| 63 |
|
#define urand(i) ((urperm[(i)&urmask]+frandom())/(urmask+1)) |
| 64 |
|
|
| 65 |
< |
#endif |
| 65 |
> |
extern int initurand(int size); |
| 66 |
|
|
| 67 |
< |
#endif |
| 67 |
> |
#endif /* ! MC */ |
| 68 |
|
|
| 69 |
+ |
#endif /* ! NORANDOM */ |
| 70 |
+ |
|
| 71 |
|
/* defined in urand.c */ |
| 73 |
– |
extern int initurand(int size); |
| 72 |
|
extern int ilhash(int *d, int n); |
| 73 |
|
/* defined in urind.c */ |
| 74 |
|
extern int urind(int s, int i); |