org.encog.mathutil.randomize.generate
Class AbstractGenerateRandom
- java.lang.Object
-
- org.encog.mathutil.randomize.generate.AbstractGenerateRandom
-
- All Implemented Interfaces:
- GenerateRandom
- Direct Known Subclasses:
- AbstractBoxMuller, BasicGenerateRandom, SecureGenerateRandom
public abstract class AbstractGenerateRandom extends java.lang.Object implements GenerateRandom
Provides a foundation for most random number generation. This allows the nextDouble to generate the other types.
-
-
Constructor Summary
Constructors Constructor and Description AbstractGenerateRandom()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description 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).intnextInt(int range)The next random int up to a non-inclusive range.intnextInt(int low, int high)The next int between low (inclusive) and high (exclusive).-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.encog.mathutil.randomize.generate.GenerateRandom
nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextLong
-
-
-
-
Method Detail
-
nextInt
public int nextInt(int low, int high)The next int between low (inclusive) and high (exclusive).- Specified by:
nextIntin interfaceGenerateRandom- Parameters:
low- The inclusive low value.high- The exclusive high value.- Returns:
- The result.
-
nextDouble
public double nextDouble(double high)
The next random double up to a non-inclusive range.- Specified by:
nextDoublein interfaceGenerateRandom- Parameters:
high- The highest desired value.- Returns:
- The result.
-
nextDouble
public double nextDouble(double low, double high)The next double between low (inclusive) and high (exclusive).- Specified by:
nextDoublein interfaceGenerateRandom- Parameters:
low- The inclusive low value.high- The exclusive high value.- Returns:
- The result.
-
nextInt
public int nextInt(int range)
The next random int up to a non-inclusive range.- Specified by:
nextIntin interfaceGenerateRandom- Parameters:
range- The highest desired value.- Returns:
- The result.
-
-
DMelt 3.0 © DataMelt by jWork.ORG