All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class simula.random.RandomEngineJava

java.lang.Object
   |
   +----simula.random.RandomEngine
           |
           +----simula.random.RandomEngineJava

public class RandomEngineJava
extends RandomEngine
This is the simplest implementation of the abstract class RandomEngine: it is based on the existing pseudo-random java engine and is the basis of the other generators in the hierarchy. Note however that this generator and the java one draw different numbers on the same seed.


Constructor Index

 o RandomEngineJava()
Creates a new random number generator.
 o RandomEngineJava(long)
Creates a new random number generator using the given seed.

Method Index

 o nextByte()
Returns the next pseudo-random byte from this generator.
 o setSeed(long)
Sets a new seed.

Constructors

 o RandomEngineJava
 public RandomEngineJava()
Creates a new random number generator. Its seed is initialized to a value based on the current time.

 o RandomEngineJava
 public RandomEngineJava(long seed)
Creates a new random number generator using the given seed.

Parameters:
seed - The initial seed.

Methods

 o nextByte
 public byte nextByte()
Returns the next pseudo-random byte from this generator.

Returns:
the next pseudo-random byte from this generator.
Overrides:
nextByte in class RandomEngine
 o setSeed
 public void setSeed(long seed)
Sets a new seed.

Parameters:
seed - New initial seed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index