org.jgap.impl
Class CauchyRandomGenerator

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

public class CauchyRandomGenerator
extends java.lang.Object
implements RandomGenerator

Cauchy probability density function (cumulative distribution function)

Since:
1.1
Author:
Klaus Meffert

Constructor Summary
CauchyRandomGenerator()
           
CauchyRandomGenerator(double a_location, double a_scale)
           
 
Method Summary
 double getCauchyStandardDeviation()
           
 boolean nextBoolean()
          Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.
 double nextCauchy()
          Calculate Cumulative Cauchy distribution function.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CauchyRandomGenerator

public CauchyRandomGenerator()
Since:
1.1

CauchyRandomGenerator

public CauchyRandomGenerator(double a_location,
                             double a_scale)
Parameters:
a_location - double
a_scale - double
Since:
1.1
Method Detail

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:
a pseudorandom 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:
a pseudorandom integer value between 0 and the given ceiling - 1, inclusive.

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:
a psuedorandom 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.

nextCauchy

public double nextCauchy()
Calculate Cumulative Cauchy distribution function.

Returns:
the probability that a stochastic variable x is less than X
Since:
1.1

getCauchyStandardDeviation

public double getCauchyStandardDeviation()
Returns:
double
Since:
1.1