[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] sobol and niederreiter quasi-random sequences
From: |
jeremy theler |
Subject: |
[Help-gsl] sobol and niederreiter quasi-random sequences |
Date: |
Sat, 12 Apr 2014 00:22:51 -0300 |
User-agent: |
KMail/4.11.5 (Linux/3.2.0-4-amd64; KDE/4.11.3; x86_64; ; ) |
Hi all
I am trying to compare the quasi-random number generator algorithms. In order
to do that, I run the following script in the doc/examples directory:
address@hidden:~/libs/gsl-1.16/doc/examples$ cat testrng.sh
for i in sobol niederreiter_2 halton reversehalton; do
cp qrng.c $i.c
sed -i s/sobol/$i/ $i.c
gcc -o $i $i.c -lgsl -lgslcblas
./$i > $i.dat
done
address@hidden:~/libs/gsl-1.16/doc/examples$ ./testrng.sh
address@hidden:~/libs/gsl-1.16/doc/examples$
Now, for the sobol and niederreiter_2 algorithms I get basically the same
sequence, except that sobol starts at (0.5,0.5) and niederreiter at (0,0). The
rest of the sequence is the same, except for the last number of course:
address@hidden:~/libs/gsl-1.16/doc/examples$ diff sobol.dat niederreiter_2.dat
0a1
> 0.00000 0.00000
1024d1024
< 0.00146 0.37646
address@hidden:~/libs/gsl-1.16/doc/examples$
Is this the expected behavior?
Thanks
--
jeremy
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-gsl] sobol and niederreiter quasi-random sequences,
jeremy theler <=