This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Monte Carlo in GSL


Dear All,

I am planning to do a Monte Carlo simulation using the GSL random number
generators. Therefore I would like to ask you something:

I have to simulate a function of one variable. This is a stochastic
process. Therefore I have to use the random number generator
gsl_ran_gaussian (const gsl_rng * r, double sigma).

Additionally I have to solve certain nonlinear equation which depends on
one variable and the nonlinear function is a stochastic process mentioned
above. Therefore I have to simulate the value of this functio couple of
times.

The question is: Do I have to execute the statement

  gsl_rng_env_setup();

  T = gsl_rng_default;
  r = gsl_rng_alloc (T);

each time I compute the value of my function or just once at the beginning
of the process where I solve the equation.

My problem is: I want that the random numbers I generate are purelly
random and not that the series of the numbers repeats.

Thanks a lot for your help,

Przemyslaw



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]