Class NormalRNG

java.lang.Object
dev.nm.stat.random.rng.univariate.normal.NormalRNG
All Implemented Interfaces:
RandomNumberGenerator, Seedable

public class NormalRNG extends Object implements RandomNumberGenerator
This is a random number generator that generates random deviates according to the Normal distribution.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    NormalRNG(double mean, double sigma)
    Construct a random number generator to sample from the Normal distribution.
    NormalRNG(double mean, double sigma, RandomStandardNormalGenerator rnorm)
    Construct a random number generator to sample from the Normal distribution.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the next random double.
    void
    seed(long... seeds)
    Seed the random number/vector/scenario generator to produce repeatable experiments.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NormalRNG

      public NormalRNG(double mean, double sigma, RandomStandardNormalGenerator rnorm)
      Construct a random number generator to sample from the Normal distribution.
      Parameters:
      mean - the mean
      sigma - the standard deviation
      rnorm - a standard random normal number generator
    • NormalRNG

      public NormalRNG(double mean, double sigma)
      Construct a random number generator to sample from the Normal distribution.
      Parameters:
      mean - the mean
      sigma - the standard deviation
  • Method Details

    • 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
    • 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