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

public abstract class ContextRNG<T> extends Object implements RandomNumberGenerator
This uniform number generator generates independent sequences of random numbers per context.
  • Constructor Details

    • ContextRNG

      public ContextRNG()
  • Method Details

    • getRNG

      protected RandomNumberGenerator getRNG(T context)
    • removeContext

      public void removeContext()
    • nextDouble

      public double nextDouble()
      Description copied from interface: RandomNumberGenerator
      Get the next random double.
      Specified by:
      nextDouble in interface RandomNumberGenerator
      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.
      Specified by:
      seed in interface Seedable
      Parameters:
      seeds - the seeds