00001 00002 00003 #ifndef __RANLUX_H__ 00004 #define __RANLUX_H__ 00005 00006 /* This is a lagged fibonacci generator with skipping developed by Luescher. 00007 The sequence is a series of 24-bit integers, x_n, 00008 00009 x_n = d_n + b_n 00010 00011 where d_n = x_{n-10} - x_{n-24} - c_{n-1}, b_n = 0 if d_n >= 0 and 00012 b_n = 2^24 if d_n < 0, c_n = 0 if d_n >= 0 and c_n = 1 if d_n < 0, 00013 where after 24 samples a group of p integers are "skipped", to 00014 reduce correlations. By default p = 199, but can be increased to 00015 365. 00016 00017 The period of the generator is around 10^171. 00018 00019 From: M. Luescher, "A portable high-quality random number generator 00020 for lattice field theory calculations", Computer Physics 00021 Communications, 79 (1994) 100-110. 00022 00023 Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/ 00024 00025 See also, 00026 00027 F. James, "RANLUX: A Fortran implementation of the high-quality 00028 pseudo-random number generator of Luscher", Computer Physics 00029 Communications, 79 (1994) 111-114 00030 00031 Kenneth G. Hamilton, F. James, "Acceleration of RANLUX", Computer 00032 Physics Communications, 101 (1997) 241-248 00033 00034 Kenneth G. Hamilton, "Assembler RANLUX for PCs", Computer Physics 00035 Communications, 101 (1997) 249-253 */ 00036 00037 namespace siscone{ 00038 00040 void ranlux_init(); 00041 00043 unsigned long int ranlux_get(); 00044 00046 void ranlux_print_state(); 00047 00048 } 00049 #endif