All Packages Class Hierarchy This Package Previous Next Index
Class simula.random.Generator
java.lang.Object
|
+----simula.random.Generator
- public abstract class Generator
- extends Object
The abstract class Generator is the common parent of the hierarchy
of the classes implementing generators with different distribution.
Every implementation of this class offers the possibility to draw
integer, real or boolean values according to the chosen distribution.
The class RandomEngine is the source of the pseudo-random bits.
Every implementation should define its own constructors in a proper
way such that its paramaters would be properly initialized.
- See Also:
- RandomEngine
-
BOOLEAN_TYPE
- Identifies a boolean valued generator.
-
INTEGER_TYPE
- Identifies an integer valued generator.
-
random
- Source of the pseudo-random bits.
-
REAL_TYPE
- Identifies a real valued generator.
-
Generator()
-
-
draw()
- Draws a value from the generator: its type can be read with the
type
method.
-
type()
- Abstract method that allows to identify the type of the value.
BOOLEAN_TYPE
public static final int BOOLEAN_TYPE
- Identifies a boolean valued generator.
INTEGER_TYPE
public static final int INTEGER_TYPE
- Identifies an integer valued generator.
REAL_TYPE
public static final int REAL_TYPE
- Identifies a real valued generator.
random
protected RandomEngine random
- Source of the pseudo-random bits.
Generator
public Generator()
draw
public abstract Value draw()
- Draws a value from the generator: its type can be read with the
type
method.
- Returns:
- Value object encapsulating the drawed value.
- See Also:
- Value
type
public abstract int type()
- Abstract method that allows to identify the type of the value.
Every implementation must provide this method.
- Returns:
- Type of the values extracted.
- See Also:
- REAL_TYPE, INTEGER_TYPE, BOOLEAN_TYPE
All Packages Class Hierarchy This Package Previous Next Index