net.tinyos.sim.script.reflect
Class Random
java.lang.Object
|
+--net.tinyos.sim.script.reflect.SimReflect
|
+--net.tinyos.sim.script.reflect.Random
- public class Random
- extends net.tinyos.sim.script.reflect.SimReflect
The Random class is used as a hook to get random numbers from the
single random number generator instance within the simulator. This
should be used instead of java.util.Random or the python builtin
interface to allow a single seed value to be passed to Tython and
therefore enable repeatable simulations.
Constructor Summary |
Random(net.tinyos.sim.script.ScriptInterpreter interp,
net.tinyos.sim.SimDriver driver)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Random
public Random(net.tinyos.sim.script.ScriptInterpreter interp,
net.tinyos.sim.SimDriver driver)
nextBoolean
public boolean nextBoolean()
nextBytes
public void nextBytes(byte[] bytes)
nextDouble
public double nextDouble()
nextFloat
public float nextFloat()
nextGaussian
public double nextGaussian()
nextInt
public int nextInt()
nextInt
public int nextInt(int n)
nextLong
public long nextLong()