"help":"Gives the state vector for the random number generator. Avoid directly modifying this unless you are very familiar with the inner workings of the algorithm used."}),
"has_gauss":(InputValue,{"dtype":int,
"default":0,
"help":"Determines whether there is a stored gaussian number or not. A value of 0 means there is none stored."}),
"gauss":(InputValue,{"dtype":float,
"default":0.00,
"help":"The stored Gaussian number."}),
"set_pos":(InputValue,{"dtype":int,
"default":0,
"help":"Gives the position in the state array that the random number generator is reading from."})}
default_help="Deals with the pseudo-random number generator."
default_label="PRNG"
defstore(self,prng):
"""Takes a random number instance and stores a minimal
representation of it.
Args:
prng: A random number object from which to initialise from.
"""
super(InputRandom,self).store(prng)
self.seed.store(prng.seed)
gstate=prng.state
self.state.store(gstate[1])
self.set_pos.store(gstate[2])
self.has_gauss.store(gstate[3])
self.gauss.store(gstate[4])
deffetch(self):
"""Creates a random number object.
Returns:
An random number object of the appropriate type and with the
appropriate properties given the attributes of the InputRandom