This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Monte Carlo in GSL
- From: "Przemyslaw Sliwa" <sliwa at euv-frankfurt-o dot de>
- To: <gsl-discuss at sources dot redhat dot com>
- Date: Wed, 18 Feb 2004 14:08:07 +0100 (MET)
- Subject: Monte Carlo in GSL
- Reply-to: sliwa at euv-frankfurt-o dot de
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