#include "sys.hpp" // for libcwd #include "debug.hpp" // for libcwd #include "gslsingleton.h" #include GslSingleton::GslSingleton() { // initialize global random generator const gsl_rng_type * T; gsl_rng_env_setup(); T = gsl_rng_default; gslr = gsl_rng_alloc (T); #ifdef SEED_RNG_WITH_42 unsigned long int seed = (long)(42); #else unsigned long int seed = (long)(time( NULL )); #endif gsl_rng_set(gslr, seed); } GslSingleton& GslSingleton::GetGslSingleton() { static GslSingleton instanz; return instanz; } gsl_rng* GslSingleton::GetGslRng() { return gslr; }