1 #ifndef _mlfg_h 2 #define _mlfg_h 3 4 //#include "int64.h" 5 6 extern "C" { 7 class MLFG : public Sprng 8 { 9 public: 10 11 MLFG(); 12 int init_rng(int, int, int, int); 13 ~MLFG(); 14 MLFG(const MLFG &); 15 MLFG & operator= (const MLFG &); 16 17 int get_rn_int(); 18 float get_rn_flt(); 19 double get_rn_dbl(); 20 int spawn_rng(int, Sprng ***); 21 int get_seed_rng(); 22 int free_rng(); 23 int pack_rng(char **); 24 int unpack_rng (char *); 25 int print_rng (); 26 27 int rng_type; 28 char *gentype; 29 int stream_number; 30 int nstreams; 31 int init_seed; 32 int parameter; 33 int narrays; 34 int *array_sizes; 35 int **arrays; 36 37 #ifdef LONG64 38 typedef unsigned LONG64 uint64; 39 #else 40 typedef unsigned int uint64[2]; 41 #endif 42 43 uint64 *lags; 44 uint64 *si; 45 int hptr; /* integer pointer into fill */ 46 int lval, kval, seed; 47 48 inline void advance_state(); 49 }; 50 } 51 #endif 52 53 /*********************************************************************************** 54 * SPRNG (c) 2014 by Florida State University * 55 * * 56 * SPRNG is licensed under a * 57 * Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. * 58 * * 59 * You should have received a copy of the license along with this * 60 * work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>. * 61 ************************************************************************************/ 62