scalation

random

package random

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

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. random
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

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

    This class generates Bernoulli random variates.

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

    This class generates Beta random variates.

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

    This class generates Binomial random variates.

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

    This class generates Cauchy (or Lorentz) random variates.

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

    This class generates ChiSquare random variates.

  6. case class Dice(cdf: Array[Double] = Array (.1, .3, .5, .7, .9, 1.0), stream: Int = 0) extends Variate with Product with Serializable

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

  7. case class Discrete(dist: VectorD = VectorD (.2, .2, .2, .2, .2), x: VectorD = null, cumulative: Boolean = false, stream: Int = 0) 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).

  8. case class Erlang(mu: Double = 1.0, k: Int = 2, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Erlang random variates.

  9. case class Exponential(mu: Double = 1.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Exponential random variates.

  10. case class Fisher(df1: Int = 6, df2: Int = 4, stream: Int = 0) extends Variate with Product with Serializable

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

  11. case class Gamma(alpha: Double = 1.0, beta: Double = 1.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Gamma random variates.

  12. case class Geometric(p: Double = .5, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Geometric random variates.

  13. case class HyperExponential(p: Double = .5, mu1: Double = 1, mu2: Double = 2, stream: Int = 0) extends Variate with Product with Serializable

    This class generates HyperExponential random variates (two rates).

  14. case class HyperGeometric(p: Double = .5, n: Int = 5, pop: Int = 10, stream: Int = 0) extends Variate with Product with Serializable

    This class generates HyperGeometric random variates.

  15. case class LogNormal(mu: Double = 0.0, sigma2: Double = 1.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates LogNormal random variates.

  16. case class Logistic(a: Double = 0.0, b: Double = 1.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Logistic random variates.

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

    This class generates Multinomial random variates vectors.

  18. case class NHPoissonProcess(lambda: VectorD, dt: Double = 1.0, stream: Int = 0) extends TimeVariate with Product with Serializable

    This class generates arrival times according to a NHPoissonProces, an Non-Homogeneous Process Process (NHPP), where the arrival rate function 'lambda(t)' is piecewise constant.

  19. case class NegativeBinomial(p: Double = .5, s: Int = 2, stream: Int = 0) extends Variate with Product with Serializable

    This class generates NegativeBinomial random variates.

  20. case class Normal(mu: Double = 0.0, sigma2: Double = 1.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Normal (Gaussian) random variates.

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

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

  22. case class Pareto(a: Double = 1.0, b: Double = 0.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Pareto random variates.

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

    The PermutedVecD class generates random permutations of a vector of doubles.

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

    The PermutedVecI class generates random permutations of a vector of integers.

  25. case class Poisson(mu: Double = 2.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Poisson random variates (discrete).

  26. case class PoissonProcess(lambda: Double, stream: Int = 0) extends TimeVariate with Product with Serializable

    This class generates arrival times according to a PoissonProcess.

  27. case class ProbabilityVec(n: Int, d: Double = 0.5, stream: Int = 0) extends VariateVec with Product with Serializable

    The ProbabilityVec class generates a probability vector where the ith probability is '1/n' with a +/- randomizing displacement of at most 'd'.

  28. abstract class RNG extends Error

    The RNG abstract class is the base class for all ScalaTion Random Number Generators (RNGs).

  29. case class Randi(a: Int = 0, b: Int = 5, stream: Int = 0) extends Variate with Product with Serializable

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

  30. case class Randi0(b: Int = 5, stream: Int = 0) extends Variate with Product with Serializable

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

  31. case class Random(stream: Int = 0) extends RNG with Product with Serializable

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

  32. case class Random2(stream: Int = 0) extends RNG with Product with Serializable

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

  33. case class Random3(stream: Int = 0) extends RNG with Product with Serializable

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

  34. case class Sharp(x: Double = 1, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Sharp (Deterministic) random variates.

  35. case class StudentT(df: Int = 4, stream: Int = 0) extends Variate with Product with Serializable

    This class generates StudentT random variates.

  36. abstract class TimeVariate extends Variate

    The TimeVariate abstract class serves as a superclass for time-based random variates such Poisson Processes.

  37. case class Trapezoidal(a: Double = 0.0, c: Double = 2.0, d: Double = 7.0, b: Double = 10.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Trapezoidal random variates.

  38. case class Triangular(a: Double = 0, b: Double = 5, c: Double = Double.MaxValue, stream: Int = 0) extends Variate with Product with Serializable

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

  39. case class Trinomial(p: Double = 1.0/3.0, q: Double = 1.0/3.0, n: Int = 10, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Trinomial random variates.

  40. case class Uniform(a: Double = 0.0, b: Double = 5.0, stream: Int = 0) extends Variate with Product with Serializable

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

  41. abstract class Variate extends Error

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

  42. abstract class VariateVec extends Error

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

  43. case class Weibull(alpha: Double = 2.0, beta: Double = 2.0, stream: Int = 0) extends Variate with Product with Serializable

    This class generates Weibull random variates.

  44. case class _HyperExponential(mu: Double = 1.0, sigma: Double = 2, stream: Int = 0) extends Variate with Product with Serializable

    This class generates HyperExponential random variates.

Value Members

  1. object PoissonProcessTest extends App

    The PoissonProcessTest object is used to test both the PoissonProcess and NHPoissonProcess classes.

  2. object Quantile extends Error

    The Quantile object contains methods for computing 'Finv', the inverse Cumulative Distribution Functions (iCDF's) for popular sampling distributions: StandardNormal, StudentT, ChiSquare and Fisher.

  3. object QuantileTest extends App

    The QuantileTest object tests the Quantile object.

  4. object RNGTest extends App with Error

    The RNGTest object conducts three simple tests of the Random Number Generators: (1) Spped Test, (2) Means Test and (3) Chi-square Goodness of Fit Test.

  5. object RandomSeeds

    The first 1000 seeds for the 'MRG31k3p' random number generator.

  6. object RandomSeeds3

    The first 1000 seeds for the LCG random number generator.

  7. object StreamMaker

    The StreamMaker object computes seeds for Random and Random2, both of which implement the 'MRG31k3p' random number generator.

  8. object StreamMaker3 extends App

    The StreamMaker3 object finds seeds for the Random3 random number generator.

  9. object StreamMakerGen extends App

    The StreamMakerGen object generates and prints the first 'k' seeds for the the 'MRG31k3p' random number generator's streams.

  10. object VariateTest extends App

    The VariateTest object conducts two simple tests of the Random Variate Generators: (1) Means Test and (2) Chi-square Goodness of Fit Test.

  11. object VariateVecTest extends App

    The VariateVecTest object is used to test the Random Variate Vector (RVV) generators from the classes derived from VariateVec.

Inherited from AnyRef

Inherited from Any

Ungrouped