scalation

random

package random

The random package contains classes, traits and objects for the generation of random numbers.

Visibility
  1. Public
  2. All

Type Members

  1. case class Bernoulli(p: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Bernoulli random variates.

  2. case class Beta(alpha: Double, beta: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Beta random variates.

  3. case class Binomial(p: Double, n: Int, stream: Int) extends Variate with Product with Serializable

    This class generates Binomial random variates.

  4. case class Cauchy(alpha: Double, beta: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Cauchy (or Lorentz) random variates.

  5. case class ChiSquare(df: Int, stream: Int) extends Variate with Product with Serializable

    This class generates ChiSquare random variates.

  6. case class Deterministic(x: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Deterministic random variates.

  7. case class Dice(cdf: Array[Double], stream: Int) extends Variate with Product with Serializable

    This class generates Dice random variates for a given distribution specified using a cumulative distribution function (cdf).

  8. case class Discrete(dist: VectorD, x: VectorD, cumulative: Boolean, stream: Int) extends Variate with Product with Serializable

    This class generates generalized Discrete random variates for a given distribution specified using either a probability mass function (pmf) or a cumulative distribution function (cdf).

  9. case class Erlang(mu: Double, k: Int, stream: Int) extends Variate with Product with Serializable

    This class generates Erlang random variates.

  10. case class Exponential(mu: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Exponential random variates.

  11. case class Fisher(df1: Int, df2: Int, stream: Int) extends Variate with Product with Serializable

    This class generates Fisher (F-Distribution) random variates.

  12. case class Gamma(alpha: Double, beta: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Gamma random variates.

  13. case class Geometric(p: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Geometric random variates.

  14. case class HyperExponential(p: Double, mu1: Double, mu2: Double, stream: Int) extends Variate with Product with Serializable

    This class generates HyperExponential random variates (two rates).

  15. case class HyperGeometric(p: Double, n: Int, pop: Int, stream: Int) extends Variate with Product with Serializable

    This class generates HyperGeometric random variates.

  16. case class LogNormal(mu: Double, sigma2: Double, stream: Int) extends Variate with Product with Serializable

    This class generates LogNormal random variates.

  17. case class Multinomial(p: Array[Double], n: Int, stream: Int) extends Variate with Product with Serializable

    This class generates Multinomial random variates.

  18. case class NegativeBinomial(p: Double, s: Int, stream: Int) extends Variate with Product with Serializable

    This class generates NegativeBinomial random variates.

  19. case class Normal(mu: Double, sigma2: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Normal (Gaussian) random variates.

  20. case class NormalVec(mu: VectorD, cov: MatrixD, stream: Int) extends VariateVec with Product with Serializable

    This class generates Normal (Gaussian) random variate vectors according to the Multivariate Normal distribution with mean 'mu' and covariance 'cov'.

  21. case class PermutedVecD(x: VectorD, stream: Int) extends VariateVec with Product with Serializable

    This class generates random permutations of a vector of doubles.

  22. case class PermutedVecI(x: VectorI, stream: Int) extends VariateVec with Product with Serializable

    This class generates random permutations of a vector of integers.

  23. case class Poisson(mu: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Poisson random variates (discrete).

  24. case class Randi(a: Int, b: Int, stream: Int) extends Variate with Product with Serializable

    This class generates Randi random variates (random integers: a, .

  25. case class Randi0(b: Int, stream: Int) extends Variate with Product with Serializable

    This class generates Randi0 random variates (random integers: 0, .

  26. case class Random(stream: Int) extends Product with Serializable

    This class generates random real numbers in the range (0, 1).

  27. case class StudentT(df: Int, stream: Int) extends Variate with Product with Serializable

    This class generates StudentT random variates.

  28. case class Triangular(a: Double, b: Double, c: Double, stream: Int) extends Variate with Product with Serializable

    This class generates simple Triangular random variates with the mode in the middle.

  29. case class Trinomial(p: Double, q: Double, n: Int, stream: Int) extends Variate with Product with Serializable

    This class generates Trinomial random variates.

  30. case class Uniform(a: Double, b: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Uniform random variates in the range (a, b).

  31. abstract class Variate extends Error

    This abstract class serves as a base class for all the random variate (RV) generators.

  32. abstract class VariateVec extends Error

    This abstract class serves as a base class for all the random variate vector (RVV) generators.

  33. case class Weibull(alpha: Double, beta: Double, stream: Int) extends Variate with Product with Serializable

    This class generates Weibull random variates.

  34. case class _HyperExponential(mu: Double, sigma: Double, stream: Int) extends Variate with Product with Serializable

    This class generates HyperExponential random variates.

Value Members

  1. object Quantile extends Error

    This object contains methods to compute inverse Cumulative Distribution Functions (iCDF's) for the popular sampling distributions: StandardNormal, StudentT, ChiSquare and Fisher.

  2. object QuantileTest extends App

    This object tests the Quantile object.

  3. object RNG extends AnyRef

    The Random Number Generator (RNG) object provides multiple pre-built random number streams.

  4. object SeedFinder extends App

    The SeedFinder object find seeds for all the random number streams.

  5. object VariateTest extends App

    Conduct two simple tests of the Random Variate Generators: (1) Means Test (2) Goodness of Fit Test.

  6. object VariateVecTest extends App

    This object is used to test the Random Variate Vector (RVV) generators.