Package jsl.utilities.random.rng
Class JavaRNG
- java.lang.Object
-
- java.util.Random
-
- jsl.utilities.random.rng.JavaRNG
-
- All Implemented Interfaces:
java.io.Serializable,java.util.function.DoubleSupplier,GetAntitheticValueIfc,RandU01Ifc
public class JavaRNG extends java.util.Random implements RandU01Ifc
A wrapper on java.util.Random that implements the RandU01Ifc- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JavaRNG()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAntitheticValue()Returns the antithetic of the previous U(0,1) i.e.doublegetPrevU01()The previous U(0,1) generated (returned) by randU01()doublerandU01()Returns a pseudo-random uniformly distributed number-
Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsl.utilities.random.rng.RandU01Ifc
asDoubleStream, getAsDouble
-
-
-
-
Method Detail
-
randU01
public double randU01()
Description copied from interface:RandU01IfcReturns a pseudo-random uniformly distributed number- Specified by:
randU01in interfaceRandU01Ifc- Returns:
- the random number
-
getPrevU01
public final double getPrevU01()
The previous U(0,1) generated (returned) by randU01()- Specified by:
getPrevU01in interfaceRandU01Ifc- Returns:
-
getAntitheticValue
public final double getAntitheticValue()
Returns the antithetic of the previous U(0,1) i.e. 1.0 - getPrevU01()- Specified by:
getAntitheticValuein interfaceGetAntitheticValueIfc- Returns:
-
-