Catalano.Math.Random
Interface IRandomNumberGenerator
-
- All Known Implementing Classes:
- MersenneTwister64, Pcg32, StandardRandom, UniversalGenerator
public interface IRandomNumberGeneratorRandom number generator interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description intnextBits(int numbits)Returns up to 32 random bits.doublenextDouble()Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.voidnextDoubles(double[] d)Returns a vector of pseudorandom, uniformly distributed double values 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 n)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.voidsetSeed(long seed)Set seed.
-
-
-
Method Detail
-
setSeed
void setSeed(long seed)
Set seed.- Parameters:
seed- Seed.
-
nextBits
int nextBits(int numbits)
Returns up to 32 random bits.
-
nextInt
int nextInt()
Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
-
nextInt
int nextInt(int n)
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
-
nextLong
long nextLong()
Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.
-
nextDouble
double nextDouble()
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.
-
nextDoubles
void nextDoubles(double[] d)
Returns a vector of pseudorandom, uniformly distributed double values between 0.0 and 1.0 from this random number generator's sequence.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG