JGAP

org.jgap.impl
Class CauchyRandomGenerator

java.lang.Object
  extended by org.jgap.impl.CauchyRandomGenerator
All Implemented Interfaces:
java.io.Serializable, RandomGenerator

public class CauchyRandomGenerator
extends java.lang.Object
implements RandomGenerator

Cauchy probability density function (cumulative distribution function).

Since:
1.1
See Also:
Serialized Form

Constructor Summary
CauchyRandomGenerator()
          Defaults to location = 0.0 and scale = 1.0.
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 a_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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CauchyRandomGenerator

public CauchyRandomGenerator()
Defaults to location = 0.0 and scale = 1.0.

Since:
1.1

CauchyRandomGenerator

public CauchyRandomGenerator(double a_location,
                             double a_scale)
Parameters:
a_location - cauchy parameter, 0 is standard
a_scale - cauchy parameter, 1 is standard
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 a_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:
a_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:
the cauchy standard deviation
Since:
1.1

JGAP