Class ContextRNG<T>
java.lang.Object
dev.nm.stat.random.rng.concurrent.context.ContextRNG<T>
- Type Parameters:
T
- the context type
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
- Direct Known Subclasses:
ThreadIDRNG
This uniform number generator generates independent sequences of random numbers per context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RandomNumberGenerator
double
Get the next randomdouble
.void
void
seed
(long... seeds) Seed the random number/vector/scenario generator to produce repeatable experiments.
-
Constructor Details
-
ContextRNG
public ContextRNG()
-
-
Method Details
-
getRNG
-
removeContext
public void removeContext() -
nextDouble
public double nextDouble()Description copied from interface:RandomNumberGenerator
Get the next randomdouble
.- Specified by:
nextDouble
in interfaceRandomNumberGenerator
- Returns:
- the next random number
-
seed
public void seed(long... seeds) Description copied from interface:Seedable
Seed the random number/vector/scenario generator to produce repeatable experiments.
-