functions
x = mcell_ran4(&highindex)
This generator was obtained from Tom Bartol
At present (version 5.2) the default is 0.
Note that this affects the random numbers computed within
model descriptions that use the functions:
scop_random, exprand, normrand, and poisrand. Also note that when a model
description uses set_seed(seed) and use_mcell_ran4 is true then the
seed refers to the 32 bit highindex as in mcell_ran4 .
EXAMPLES
execute following example
objref vec, g1, g2, hist
vec = new Vector(1000)
g1 = new Graph()
g2 = new Graph()
g1.size(0, 1000, 0, 1)
g2.size(0, 1, 0, 150)
highindex = 1
lowindex = mcell_ran4_init()
proc doit() {local i
g1.erase() g2.erase()
for i=0, vec.size-1 {
vec.x[i] = mcell_ran4(&highindex)
}
hist = vec.histogram(0, 1, 0.1)
vec.line(g1)
hist.line(g2, .1)
g1.flush g2.flush
}
variable_domain(&highindex, 0, 2^32-1)
xpanel("mcell_ran4 test")
xbutton("Sample", "doit()")
xpvalue("highindex", &highindex, 1, "doit()")
xpvalue("lowindex", &lowindex, 1, "mcell_ran4_init(lowindex) doit()")
xpanel()
doit()
SEE ALSO
Random MCellRan4 use_mcell_ran4 mcell_ran4_init
use_mcell_ran4
functions
SYNTAX
previous = use_mcell_ran4(next) // next must be 0 or 1
boolean = use_mcell_ran4()
DESCRIPTION
use_mcell_ran4(1) causes scop_random in model descriptions to use
the mcell_ran4 cryptgraphic quality random generator. Otherwise, the
low quality (but faster) linear conguential generator is used.
mcell_ran4_init
functions
Notification
SYNTAX
previous_lowindex = mcell_ran4_init(lowindex)
lowindex= mcell_ran4_init()
DESCRIPTION
Sets the 32 bit lowindex of the mcell_ran4 generator. The default lowindex
is 0. This affects random number streams (when use_mcell_ran4() returns 1)
in model descriptions using scop_rand, etc. It also affects Random
class streams that are using the MCellRan4 generator.