X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fnlsop.git;a=blobdiff_plain;f=random.h;h=d8b47e61c6d2edb1f8319d805e823b3e45fb35b5;hp=4fa9aaed51a6174bedd0850a3e98d1f02a07cc74;hb=HEAD;hpb=5d5a9a58e9ecb4221b1c41e536b9648500b9b41d diff --git a/random.h b/random.h index 4fa9aae..d8b47e6 100644 --- a/random.h +++ b/random.h @@ -5,6 +5,9 @@ * */ +#ifndef RANDOM_H +#define RANDOM_H + #include "nlsop.h" #include #include @@ -12,9 +15,15 @@ /* function prototypes */ int rand_init(char *rf); int rand_close(void); -int get_rand(u32 max); -int get_rand_lgp(u32 max,double a,double b); +u32 get_rand(u32 max); +u32 get_rand_lgp(u32 max,double a,double b); +u32 get_rand_reject(u32 max_x,u32 max_y,u32 *graph); -#define BUFSIZE (16*1048576) /* 64 MByte */ +#ifdef MAC +#define BUFSIZE (256*1048576) /* 256 MByte */ +#else +#define BUFSIZE (16*1048576) /* 16 MByte */ +#endif #define URAND_MAX 0xffffffff +#endif /* RANDOM_H */