Class Distribution<T,U extends Random>

java.lang.Object
org.flag4j.rng.distributions.Distribution<T,U>
Type Parameters:
T - The type of the output of the distributions probability density function.
Direct Known Subclasses:
Complex128BiGaussian, Complex128UniformDisk, Complex128UniformRect, RealGaussian, RealUniform

public abstract class Distribution<T,U extends Random> extends Object
Base class for all statistical distributions.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final U
    The random number generator to use when sampling this distribution.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructs a distribution with a random number generator to be used for sampling this distribution.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract T
    Randomly samples this distribution.

    Methods inherited from class java.lang.Object

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

    • rng

      protected final U extends Random rng
      The random number generator to use when sampling this distribution.
  • Constructor Details

    • Distribution

      protected Distribution(U rng)
      Constructs a distribution with a random number generator to be used for sampling this distribution.
      Parameters:
      rng - Random number generator to use when sampling this distribution.
  • Method Details

    • sample

      public abstract T sample()
      Randomly samples this distribution.
      Returns:
      A random value distributed according to this distribution.