jmetal.util
Class PseudoRandom

java.lang.Object
  extended by jmetal.util.PseudoRandom

public class PseudoRandom
extends java.lang.Object

Class representing a pseudo-random number generator


Method Summary
static double randDouble()
          Returns a random double value using the PseudoRandom generator.
static double randDouble(double minBound, double maxBound)
          Returns a random double value between a minimum bound and a maximum bound using the PseudoRandom generator.
static int randInt()
          Returns a random int value using the Java random generator.
static int randInt(int minBound, int maxBound)
          Returns a random int value between a minimum bound and maximum bound using the PseudoRandom generator.
static void setRandomGenerator(IRandomGenerator generator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setRandomGenerator

public static void setRandomGenerator(IRandomGenerator generator)

randInt

public static int randInt()
Returns a random int value using the Java random generator.

Returns:
A random int value.

randDouble

public static double randDouble()
Returns a random double value using the PseudoRandom generator. Returns A random double value.


randInt

public static int randInt(int minBound,
                          int maxBound)
Returns a random int value between a minimum bound and maximum bound using the PseudoRandom generator.

Parameters:
minBound - The minimum bound.
maxBound - The maximum bound. Return A pseudo random int value between minBound and maxBound.

randDouble

public static double randDouble(double minBound,
                                double maxBound)
Returns a random double value between a minimum bound and a maximum bound using the PseudoRandom generator.

Parameters:
minBound - The minimum bound.
maxBound - The maximum bound.
Returns:
A pseudo random double value between minBound and maxBound