org.jgap.impl
Class CauchyRandomGenerator
- java.lang.Object
-
- 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
Constructors Constructor and Description CauchyRandomGenerator()Defaults to location = 0.0 and scale = 1.0.CauchyRandomGenerator(double a_location, double a_scale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetCauchyStandardDeviation()booleannextBoolean()Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.doublenextCauchy()Calculate Cumulative Cauchy distribution function.doublenextDouble()Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.floatnextFloat()Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.intnextInt()Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.intnextInt(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.longnextLong()Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.
-
-
-
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 standarda_scale- cauchy parameter, 1 is standard- Since:
- 1.1
-
-
Method Detail
-
nextInt
public int nextInt()
Description copied from interface:RandomGeneratorReturns 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:
nextIntin interfaceRandomGenerator- Returns:
- a pseudorandom integer value
-
nextInt
public int nextInt(int a_ceiling)
Description copied from interface:RandomGeneratorReturns 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:
nextIntin interfaceRandomGenerator- 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:RandomGeneratorReturns 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:
nextLongin interfaceRandomGenerator- Returns:
- a psuedorandom long value
-
nextDouble
public double nextDouble()
Description copied from interface:RandomGeneratorReturns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.- Specified by:
nextDoublein interfaceRandomGenerator- Returns:
- a psuedorandom double value GREATER/EQUAL 0 AND LESS THAN 1
-
nextFloat
public float nextFloat()
Description copied from interface:RandomGeneratorReturns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.- Specified by:
nextFloatin interfaceRandomGenerator- Returns:
- a psuedorandom float value
-
nextBoolean
public boolean nextBoolean()
Description copied from interface:RandomGeneratorReturns 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:
nextBooleanin interfaceRandomGenerator- 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
-
-
DMelt 3.0 © DataMelt by jWork.ORG