org.jgap.impl
Class GaussianRandomGenerator

java.lang.Object
  extended byorg.jgap.impl.GaussianRandomGenerator
All Implemented Interfaces:
RandomGenerator

public class GaussianRandomGenerator
extends java.lang.Object
implements RandomGenerator

Gaussian deviation serving as basis for randomly finding a number.

Since:
1.1
Author:
Klaus Meffert

Constructor Summary
GaussianRandomGenerator()
           
GaussianRandomGenerator(double a_standardDeviation)
          Constructor speicifying the (obliagtory) standard deviation
 
Method Summary
 double getGaussianStdDeviation()
           
 boolean nextBoolean()
          Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.
 double nextDouble()
          Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.
 float nextFloat()
          Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.
 int nextInt()
          Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
 int nextInt(int ceiling)
          Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
 long nextLong()
          Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.
 void setGaussianMean(double a_mean)
           
 void setGaussianStdDeviation(double a_standardDeviation)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaussianRandomGenerator

public GaussianRandomGenerator()

GaussianRandomGenerator

public GaussianRandomGenerator(double a_standardDeviation)
Constructor speicifying the (obliagtory) standard deviation

Parameters:
a_standardDeviation - the standard deviation to use
Method Detail

setGaussianMean

public void setGaussianMean(double a_mean)

setGaussianStdDeviation

public void setGaussianStdDeviation(double a_standardDeviation)

getGaussianStdDeviation

public double getGaussianStdDeviation()

nextInt

public int nextInt()
Description copied from interface: RandomGenerator
Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence. The general contract of nextInt is that one int value is pseudorandomly generated and returned. All 2^32 possible int values are produced with (approximately) equal probability.

Specified by:
nextInt in interface RandomGenerator
Returns:
positive integer value

nextInt

public int nextInt(int ceiling)
Description copied from interface: RandomGenerator
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence. The general contract of nextInt is that one int value in the specified range is pseudorandomly generated and returned. All n possible int values are produced with (approximately) equal probability.

Specified by:
nextInt in interface RandomGenerator
Parameters:
ceiling - the upper boundary excluded
Returns:
positive integer value between 0 and (ceiling - 1)

nextLong

public long nextLong()
Description copied from interface: RandomGenerator
Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence. The general contract of nextLong() is that one long value is pseudorandomly generated and returned. All 2^64 possible long values are produced with (approximately) equal probability.

Specified by:
nextLong in interface RandomGenerator
Returns:
positive long value

nextDouble

public double nextDouble()
Description copied from interface: RandomGenerator
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

Specified by:
nextDouble in interface RandomGenerator
Returns:
a psuedorandom double value GREATER/EQUAL 0 AND LESS THAN 1.

nextFloat

public float nextFloat()
Description copied from interface: RandomGenerator
Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.

Specified by:
nextFloat in interface RandomGenerator
Returns:
a psuedorandom float value.

nextBoolean

public boolean nextBoolean()
Description copied from interface: RandomGenerator
Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence. The general contract of nextBoolean is that one boolean value is pseudorandomly generated and returned. The values true and false are produced with (approximately) equal probability.

Specified by:
nextBoolean in interface RandomGenerator
Returns:
a pseudorandom boolean value.