So what is the difference between srand and merseentwister?
when I do:
r=srand(0)
I get the same as
r=MersenneTwister(0)
and also how do I get my random numbers
what do the different fields mean?
e.g.
julia> r.(1)
1-element Array{UInt32,1}:
0x00000000
julia> r.(2)
Base.dSFMT.DSFMT_state(Int32[748398797,1073523691,-1738140313,1073664641,-1492392947,1073490074,-1625281839,1073254801,1875112882,1073717145 … 943540191,1073626624,1091647724,1073372234,-1273625233,-823628301,835224507,991807863,382,0])
julia> r.(2).(1)
770-element Array{Int32,1}:
748398797
1073523691
-1738140313
1073664641
-1492392947
1073490074
-1625281839
1073254801
1875112882
1073717145
-147366646
1073379643
-822088544
1073057897
-172354
1073036393
-1801109415
1073061557
-1726958192
1073632729
-309172420
1073464042
-354763249
1073128395
135648219
1073687628
92195370
1073342927
-87798830
1073300027
446697077
1073397042
-1348144529
1073439833
-64993866
1073659055
-992725433
1073226916
348453421
1072702220
⋮
1073417805
-1607069797
1072770558
118292460
1073306270
-572602520
1073370707
-445536129
1073393538
1989954253
1073598613
986054037
1073137169
1796020743
1073612929
161145485
1073732406
-773274735
1072720842
1219081491
1073737258
1793984938
1072858519
-1584606890
1072715174
-1892075178
1073622009
-183639381
1072906897
943540191
1073626624
1091647724
1073372234
-1273625233
-823628301
835224507
991807863
382
0
julia> r.(3)
382-element Array{Float64,1}:
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
⋮
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
The number I had in my head for MersenneTwister was 624 but I dont find it anywhere?
Do I only initialize the pseudo random number generator this way and the actual "random" number is then obtain by rand(1) for example?
How do I acutally set the seed coz when I do
srand(0) and rand() would actually be a mersennetwister I'd expect zeros everywhere...
Thx