org.encog.mathutil.randomize.generate
Interface GenerateRandom
-
- All Known Implementing Classes:
- AbstractBoxMuller, AbstractGenerateRandom, BasicGenerateRandom, LinearCongruentialRandom, MersenneTwisterGenerateRandom, MultiplyWithCarryGenerateRandom, SecureGenerateRandom
public interface GenerateRandomInterface that defines how random numbers are generated. Provides the means to generate both uniform and normal (gaussian) distributed random numbers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleannextBoolean()doublenextDouble()doublenextDouble(double high)The next random double up to a non-inclusive range.doublenextDouble(double low, double high)The next double between low (inclusive) and high (exclusive).floatnextFloat()doublenextGaussian()intnextInt()intnextInt(int high)The next random int up to a non-inclusive range.intnextInt(int low, int high)The next int between low (inclusive) and high (exclusive).longnextLong()
-
-
-
Method Detail
-
nextGaussian
double nextGaussian()
- Returns:
- The next normally distributed random number.
-
nextBoolean
boolean nextBoolean()
- Returns:
- The next random boolean.
-
nextLong
long nextLong()
- Returns:
- The next random long.
-
nextFloat
float nextFloat()
- Returns:
- The next random floating point.
-
nextDouble
double nextDouble()
- Returns:
- The next random double.
-
nextDouble
double nextDouble(double high)
The next random double up to a non-inclusive range.- Parameters:
high- The highest desired value.- Returns:
- The result.
-
nextDouble
double nextDouble(double low, double high)The next double between low (inclusive) and high (exclusive).- Parameters:
low- The inclusive low value.high- The exclusive high value.- Returns:
- The result.
-
nextInt
int nextInt()
- Returns:
- The next random integer.
-
nextInt
int nextInt(int high)
The next random int up to a non-inclusive range.- Parameters:
high- The highest desired value.- Returns:
- The result.
-
nextInt
int nextInt(int low, int high)The next int between low (inclusive) and high (exclusive).- Parameters:
low- The inclusive low value.high- The exclusive high value.- Returns:
- The result.
-
-
DMelt 3.0 © DataMelt by jWork.ORG