Class DiscreteUniform

All Implemented Interfaces:
Serializable

public class DiscreteUniform extends DiscreteDistribution implements Serializable
A discrete distribution that samples uniformly among a set of elements.
See Also:
  • Constructor Details

    • DiscreteUniform

      public DiscreteUniform(double minVal, double maxVal)
  • Method Details

    • sample

      public double[] sample(int n)
      Gets n samples from the distribution
      Overrides:
      sample in class Distribution
      Parameters:
      n - - the number of samples
      Returns:
      - n samples from the distribution
    • sample

      public double[] sample(int n, Random random)
      Specified by:
      sample in class Distribution
    • getMean

      public double getMean()
      Specified by:
      getMean in class Distribution
    • getRate

      public double getRate()
      Overrides:
      getRate in class Distribution
    • getSCV

      public double getSCV()
      Specified by:
      getSCV in class Distribution
    • getVar

      public double getVar()
      Overrides:
      getVar in class Distribution
    • getSkewness

      public double getSkewness()
      Specified by:
      getSkewness in class Distribution
    • evalCDF

      public double evalCDF(double t)
      Specified by:
      evalCDF in class Distribution