All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class evolution.util.RandomGenerator

java.lang.Object
   |
   +----evolution.util.RandomGenerator

public class RandomGenerator
extends Object
Default RandomGenerator, based on the standard java.util.Random.


Variable Index

 o myRG

Constructor Index

 o RandomGenerator()
Create myself to be based on a new java.util.Random, seeded with the current time.
 o RandomGenerator(byte[])
Create myself to be based on a new java.util.Random, seeded with the given seed.
 o RandomGenerator(long)
Create myself to be based on a new java.util.Random, seeded with the given seed.

Method Index

 o aByte()
 o aFloat()
 o anInt()
 o anInt(int, int)
 o maxInt()
 o seed(byte[])
Create myself to be based on a new java.util.Random, seeded with the given seed.
 o yes(float)

Variables

 o myRG
 protected Random myRG

Constructors

 o RandomGenerator
 public RandomGenerator()
Create myself to be based on a new java.util.Random, seeded with the current time.

 o RandomGenerator
 public RandomGenerator(byte seed[])
Create myself to be based on a new java.util.Random, seeded with the given seed.

 o RandomGenerator
 public RandomGenerator(long seed)
Create myself to be based on a new java.util.Random, seeded with the given seed.

Methods

 o seed
 public void seed(byte seed[])
Create myself to be based on a new java.util.Random, seeded with the given seed.

Parameters:
seed - != nil
 o aByte
 public byte aByte()
Returns:
a random byte
 o anInt
 public int anInt()
Returns:
a random non-negative integer
 o anInt
 public int anInt(int lower,
                  int upper)
Returns:
a random integer in [lower, upper)
 o yes
 public boolean yes(float probability)
Parameters:
probability - the probability to return true
Returns:
true with the probability probability
 o maxInt
 public static int maxInt()
Returns:
the upper bound of my possible integer values
 o aFloat
 public float aFloat()
Returns:
a positive float number

All Packages  Class Hierarchy  This Package  Previous  Next  Index