Package examples.utilities.random
Class PMMLCG
- java.lang.Object
-
- examples.utilities.random.PMMLCG
-
- All Implemented Interfaces:
java.util.function.DoubleSupplier,GetAntitheticValueIfc,RandU01Ifc
public class PMMLCG extends java.lang.Object implements RandU01Ifc
Random is a PMMLCG generator that returns a pseudo-random real number uniformly distributed between 0.0 and 1.0. The period is (m - 1) where m = 2,147,483,647 and the smallest and largest possible values are (1 / m) and 1 - (1 / m) respectively.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAntitheticValue()Returns the antithetic value of the previous valuelonggetDefaultSeed()doublegetPrevU01()The previous U(0,1) generated (returned) by randU01()longgetSeed()static voidmain(java.lang.String[] args)doublerandU01()Returns a pseudo-random uniformly distributed numbervoidsetSeed(long seed)-
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
-
getDefaultSeed
public final long getDefaultSeed()
-
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 double getPrevU01()
Description copied from interface:RandU01IfcThe previous U(0,1) generated (returned) by randU01()- Specified by:
getPrevU01in interfaceRandU01Ifc- Returns:
- previous U(0,1) generated (returned) by randU01()
-
getAntitheticValue
public double getAntitheticValue()
Description copied from interface:GetAntitheticValueIfcReturns the antithetic value of the previous value- Specified by:
getAntitheticValuein interfaceGetAntitheticValueIfc- Returns:
- the antithetic value of the previous value
-
setSeed
public final void setSeed(long seed)
-
getSeed
public final long getSeed()
-
main
public static void main(java.lang.String[] args)
-
-