43 #ifdef BUILD_SOBOL_DLL
44 #define EGS_SOBOL_EXPORT __declspec(dllexport)
46 #define EGS_SOBOL_EXPORT __declspec(dllimport)
48 #define EGS_SOBOL_LOCAL
52 #ifdef HAVE_VISIBILITY
53 #define EGS_SOBOL_EXPORT __attribute__ ((visibility ("default")))
54 #define EGS_SOBOL_LOCAL __attribute__ ((visibility ("hidden")))
56 #define EGS_SOBOL_EXPORT
57 #define EGS_SOBOL_LOCAL
66#include "egs_functions.h"
78 int err = inp->getInput(
"dimension", dimension);
79 if (err || dimension < 0 || dimension > 3) {
84 err = inp->getInput(
"initial seed", init_seed);
85 if (err || init_seed < 1) {
91 setState(dimension, init_seed);
95 EGS_RandomGenerator(dimension), copy(0) {
105 setState(dimension, iseed);
123 void fillArray(
int n, EGS_Float *array);
126 void describeRNG()
const;
128 EGS_RandomGenerator *getCopy();
130 void setState(EGS_RandomGenerator *r);
137 return baseSize() +
sizeof(int) + 2*
sizeof(EGS_I64);
145 bool storePrivateState(ostream &data);
148 bool setPrivateState(istream &data);
153 void setState(
int dimension, EGS_I64 init_seed);
EGS_RandomGenerator wrapper for Sobol library.
EGS_Sobol(EGS_Input *inp)
EGS_Sobol(const EGS_Sobol &r)
EGS_I64 cur_seed
initial seed for random number generator
EGS_Sobol * copy
current seed being used for random number generator (required to reinitialize
EGS_Sobol(int dimension=3, EGS_I64 iseed=-1)
int tau_sobol(int dim_num)
Sobol library functions from http://people.sc.fsu.edu/~jburkardt/cpp_src/sobol/sobol....