- All Superinterfaces:
DoubleSupplier,RandomNumberGenerator,Serializable
- All Known Implementing Classes:
AcceptanceRejectionRandomNumberGenerator,HighEntropyRandomNumberGenerator,MersenneTwister,SobolSequence1D,VanDerCorputSequence
Interface for a 1-dimensional random number generator
generating a sequence of vectors sampling the space [0,1]
- Version:
- 1.0
- Author:
- Christian Fries
-
Method Summary
Modifier and TypeMethodDescriptiondefault doubledefault intGet the sample vector dimension.default double[]getNext()Get the next sample vector of dimension n, where n isgetDimension.doubleThread safe implementation returning the next double value of this random number generator.default doublePossibly faster, non-thread safe implementation returning the next double value of this random number generator.
-
Method Details
-
nextDouble
double nextDouble()Thread safe implementation returning the next double value of this random number generator.- Returns:
- The next double value of this random number generator
-
nextDoubleFast
default double nextDoubleFast()Possibly faster, non-thread safe implementation returning the next double value of this random number generator. The user of this method has to ensure synchronization if this generator is shared by different threads.- Returns:
- The next double value of this random number generator
-
getNext
default double[] getNext()Description copied from interface:RandomNumberGeneratorGet the next sample vector of dimension n, where n isgetDimension. An implementation has to be thread safe.- Specified by:
getNextin interfaceRandomNumberGenerator- Returns:
- The next sample vector of dimension n, where n is
getDimension.
-
getDimension
default int getDimension()Description copied from interface:RandomNumberGeneratorGet the sample vector dimension.- Specified by:
getDimensionin interfaceRandomNumberGenerator- Returns:
- The sample vector dimension n.
-
getAsDouble
default double getAsDouble()- Specified by:
getAsDoublein interfaceDoubleSupplier
-