Packages

p

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

    This class generates Bernoulli random variates. This discrete RV models the one trial (success is 1, failure is 0).

    p

    the probability of success

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/bernoulli/Introduction.html

  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.

    This class generates Beta random variates. This continuous RV models random proportions. Beta = Gamma1 / (Gamma1 + Gamma2).

    alpha

    the shape parameter for Gamma1

    beta

    the shape parameter for Gamma2

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Beta.html

  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.

    This class generates Binomial random variates. This discrete RV models the number of successes in n trials.

    p

    the probability of success

    n

    the number of independent trials

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/bernoulli/Binomial.html

  4. trait CDFTest extends AnyRef

    The CDFTest trait provides methods for testing the CDF object.

  5. 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.

    This class generates Cauchy (or Lorentz) random variates. This continuous RV models data with heavier tails than normally distributed.

    alpha

    the location parameter (median)

    beta

    the scale parameter

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Cauchy.html

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

    This class generates ChiSquare random variates.

    This class generates ChiSquare random variates. This continuous RV models the variance of a distribution.

    df

    the degrees of freedom

    stream

    the random number stream

    See also

    www.math.uah.edu/stat/special/ChiSquare.html

  7. 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).

    This class generates Dice random variates for a given distribution specified using a cumulative distribution function (cdf). This discrete RV models the roll of dice numbered 0, 1, ..., n-1. Add 1 for 1 to n.

    cdf

    the distribution function (cdf)

    stream

    the random number stream

    See also

    Randi for an easy way to use fair dice 'Randi (1, 6)'.

  8. case class Dir(alpha: VectoD, stream: Int = 0) extends Product with Serializable

    The Dir class generates Dirichlet random variables.

    The Dir class generates Dirichlet random variables. The Dirichlet distribution is the distribution over the space of multinomial distributions.

    alpha

    the concentration parameters

    stream

    the random number stream

    See also

    en.wikipedia.org/wiki/Dirichlet_distribution

    www.quora.com/What-is-an-intuitive-explanation-of-the-Dirichlet-distribution

  9. case class Discrete(dist: VectoD = 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).

    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). This discrete RV models arbitrary experiments with discrete outcomes.

    dist

    the distribution function (pdf or cdf)

    x

    the x-coordinate values (mass points)

    cumulative

    whether 'dist' is cumulative (cdf) or not (pmf)

    stream

    the random number stream

  10. case class DiscreteF(f: Array[FunctionS2S] = Array ((x: Double) => x), stream: Int = 0) extends Variate with Product with Serializable

    The DiscreteF class generates generalized Discrete random variates for a distribution specified via an array of functions (FunctionS2S).

    The DiscreteF class generates generalized Discrete random variates for a distribution specified via an array of functions (FunctionS2S). At a particular time 't', the functions must some to one. This discrete RV models time-varying experiments with discrete outcomes.

    f

    the array of time-based functions

    stream

    the random number stream

  11. type Distribution = (Double, Parameters) ⇒ Double

    The function type for distribution functions, including (1) Cumulative Distribution Function (CDF) (2) inverse Cumulative Distribution Function (iCDF) The arguments are Double for coordinate 'x' or probability 'p' and a Vector of parameters, e.g., degrees of freedom.

  12. 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.

    This class generates Erlang random variates. This continuous RV models the time until k stages complete.

    mu

    the mean of exponential samples (Erlang mean = mu * k)

    k

    the number of stages (or Exponential samples)

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/poisson/Gamma.html

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

    This class generates Exponential random variates.

    This class generates Exponential random variates. This continuous RV models the time until an event occurs.

    mu

    the mean

    stream

    the random number stream

    See also

    www.math.uah.edu/stat/poisson/Exponential.html

  14. 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.

    This class generates Fisher (F-Distribution) random variates. This continuous RV models the ratio of variances.

    df1

    the degrees of freedom for numerator Chi-Square

    df2

    the degrees of freedom for denominator Chi-Square

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Fisher.html

  15. 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.

    This class generates Gamma random variates. This continuous RV models the time until an event occurs. Note: variance = alpha * beta ^ 2.

    alpha

    the shape parameter

    beta

    the scale parameter

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/poisson/Gamma.html

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

    This class generates Geometric random variates.

    This class generates Geometric random variates. This discrete RV models the number of failures before the first success.

    p

    the probability of success

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/bernoulli/Geometric.html

  17. 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).

    This class generates HyperExponential random variates (two rates). This continuous RV models the time until an event occurs (higher coefficient of variation than exponential distribution).

    p

    the probability of first vs. second rates

    mu1

    the first mean (1 / lambda1)

    mu2

    the second mean (1 / lambda2)

    stream

    the random number stream

  18. 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.

    This class generates HyperGeometric random variates. This discrete RV models the number of successes in n draws from a finite population.

    p

    the probability of success (red balls)

    n

    the number of draws (balls drawn)

    pop

    the size of the finite population (total number of balls)

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/urn/Hypergeometric.html

  19. 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.

    This class generates LogNormal random variates. This continuous RV models data that is normally distributed after a log transformation.

    mu

    the mean for underlying Normal

    sigma2

    the variance (sigma squared) for underlying Normal

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/LogNormal.html

  20. 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.

    This class generates Logistic random variates. This continuous RV models logistically distributed data (stretched Normal).

    a

    the location parameter

    b

    the scale parameter

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Logistic.html

  21. case class Multinomial(p: Array[Double] = Array (.4, .7, 1.0), n: Int = 5, stream: Int = 0) extends VariateVec with Product with Serializable

    The Multinomial class generates random variate vectors following the multinomial distribution.

    The Multinomial class generates random variate vectors following the multinomial distribution. This discrete RV models the multinomial trials, which generalize Bernoulli trials ({0, 1} to the case where the outcome is in {0, 1, ..., k-1}.

    p

    array of cumulative probabilities as CDF values

    n

    the number of independent trials

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/bernoulli/Multinomial.html

  22. 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 NHPoissonProcess, an Non-Homogeneous Process Process (NHPP), where the arrival rate function 'lambda(t)' is piece-wise constant.

    This class generates arrival times according to a NHPoissonProcess, an Non-Homogeneous Process Process (NHPP), where the arrival rate function 'lambda(t)' is piece-wise constant. Rates are constant over basic time intervals of length 'dt'.

    lambda

    the vector of arrival rates

    dt

    the length the basic time intervals

    stream

    the random number stream

    See also

    http://en.wikipedia.org/wiki/Poisson_process#Non-homogeneous

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

    This class generates NegativeBinomial random variates.

    This class generates NegativeBinomial random variates. This discrete RV models the number of failures before s-th success.

    p

    the probability of success

    s

    the number of successes

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/bernoulli/NegativeBinomial.html

  24. 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.

    This class generates Normal (Gaussian) random variates. This continuous RV models normally distributed data (bell curve). When summed, most distributions tend to Normal (Central Limit Theorem).

    mu

    the mean

    sigma2

    the variance (sigma squared)

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Normal.html

  25. case class NormalVec(mu: VectoD, 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'.

    The NormalVec class generates Normal (Gaussian) random variate vectors according to the Multivariate Normal distribution with mean 'mu' and covariance 'cov'. This continuous RVV models normally distributed multidimensional data.

    mu

    the mean vector

    cov

    the covariance matrix

    stream

    the random number stream

    See also

    http://www.statlect.com/mcdnrm1.htm

    http://onlinelibrary.wiley.com/doi/10.1111/1467-9639.00037/pdf

  26. type Parameters = Vector[Double]

    Type definition for parameters to a distribution.

    Type definition for parameters to a distribution. Vector is used instead of Array since they are covariant, while Scala arrays are not.

  27. 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.

    This class generates Pareto random variates. This continuous RV models Pareto distributed data.

    a

    the shape parameter

    b

    the scale parameter

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Pareto.html

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

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

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

    x

    the vector of doubles to permute

    stream

    the random number stream

    See also

    maths-people.anu.edu.au/~brent/pd/Arndt-thesis.pdf

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

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

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

    x

    the vector of integers to permute

    stream

    the random number stream

    See also

    maths-people.anu.edu.au/~brent/pd/Arndt-thesis.pdf

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

    This class generates Poisson random variates (discrete).

    This class generates Poisson random variates (discrete). This discrete RV models the number of events in a time interval of unit length.

    mu

    the mean

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/poisson/Poisson.html

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

    This class generates arrival times according to a PoissonProcess.

    This class generates arrival times according to a PoissonProcess. Given the current arrival time 't', generate the next arrival time.

    lambda

    the arrival rate (arrivals per unit time)

    stream

    the random number stream

    See also

    http://en.wikipedia.org/wiki/Poisson_process

  32. case class PowerLaw(a: Double = 1.0, b: Double = 10.0, y: Double = 2.1, stream: Int = 0) extends Variate with Product with Serializable

    This class generates PowerLaw random variates: 'cx^-y' for 'x in [a, b]'. This continuous RV models power-law distributions.

    This class generates PowerLaw random variates: 'cx^-y' for 'x in [a, b]'. This continuous RV models power-law distributions.

    a

    the minimum value parameter

    b

    the maximum value parameter

    y

    the power parameter to be used

    stream

    the random number stream

    See also

    http://mathworld.wolfram.com/RandomNumber.html

  33. 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 'i'th probability is '1/n' with a +/- randomizing displacement of at most 'd'.

    The ProbabilityVec class generates a probability vector where the 'i'th probability is '1/n' with a +/- randomizing displacement of at most 'd'. Note, the probability vector must add to one.

    n

    the dimension/size of the probability vector

    d

    the randomizing displacement, must be in [0, 1]

  34. trait QuantileTest extends AnyRef

    The QuantileTest trait provides methods for testing the Quantile object.

  35. abstract class RNG extends Error

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

    The RNG abstract class is the base class for all ScalaTion Random Number Generators. The subclasses must implement a 'gen' method that generates random real numbers in the range (0, 1). They must also implement an 'igen' methods to return stream values.

  36. 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, ..., b).

    This class generates Randi random variates (random integers: a, ..., b). This discrete RV models equi-probable integral outcomes.

    a

    the lower bound (inclusive)

    b

    the upper bound (inclusive)

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/UniformDiscrete.html

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

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

    This class generates Randi0 random variates (random integers: 0, ..., b). This discrete RV models equi-probable integral outcomes starting with 0.

    b

    the upper bound (>= 0) (inclusive)

    stream

    the random number stream

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

    This class generates RandiU0 random variates (unique random integers: 0, ..., b).

    This class generates RandiU0 random variates (unique random integers: 0, ..., b). This discrete RV models equi-probable integral outcomes starting with 0.

    b

    the upper bound (>= 0) (inclusive)

    stream

    the random number stream

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

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

    The Random class generates random real numbers in the range (0, 1). It implements, using 64-bit integers (Long's), the 'MRG31k3p' generator developed by L'Ecuyer and Touzin, described in "FAST COMBINED MULTIPLE RECURSIVE GENERATORS WITH MULTIPLIERS OF THE FORM a = 2q +/- 2r". MRG31k3p is a Combined Multiple Recursive Generator (CMRG) shown to have good performance and statistical properties for simulations. It has a period of about 2185 and is considered to be a faster alternative to the popular 'MRG32k3' generator. MRG31k3p combines MRG1 and MRG2.
    MRG1: x_i = (0 + a_12 x_i-2 + a_13 x_i-3) % M1 MRG2: x_i = (a_21 x_i-1 + 0 + a_23 x_i-3) % M2
    where a_12 = 2
    22, a_13 = 27+1, a_21 = 215 and a_23 = 2^15+1.

    stream

    the random number stream index

    See also

    http://www.iro.umontreal.ca/~simardr/ssj/doc/pdf/guiderng.pdf

    http://www.informs-sim.org/wsc00papers/090.PDF

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

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

    The Random2 class generates random real numbers in the range (0, 1). It implements, using 32-bit integers (Int's), the 'MRG31k3p' generator developed by L'Ecuyer and Touzin, described in "FAST COMBINED MULTIPLE RECURSIVE GENERATORS WITH MULTIPLIERS OF THE FORM a = 2q +/- 2r". MRG31k3p is a Combined Multiple Recursive Generator (CMRG) shown to have good performance and statistical properties for simulations. It has a period of about 2185 and is considered to be a faster alternative to the popular 'MRG32k3' generator. MRG31k3p combines MRG1 and MRG2.
    MRG1: x_i = (0 + a_12 x_i-2 + a_13 x_i-3) % M1 MRG2: x_i = (a_21 x_i-1 + 0 + a_23 x_i-3) % M2
    where a_12 = 2
    22, a_13 = 27+1, a_21 = 215 and a_23 = 2^15+1.

    stream

    the random number stream index

    See also

    http://www.iro.umontreal.ca/~simardr/ssj/doc/pdf/guiderng.pdf

    http://www.informs-sim.org/wsc00papers/090.PDF

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

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

    The Random3 class generates random real numbers in the range (0, 1). It implements, using 64-bit integers (Int's), the 'MINSTD' generator, which is a multiplicative Linear Congruential Generator (LCG). These generators were commonly used in the last century.
    x_i = a x_i-1 % m

    stream

    the random number stream index

    See also

    http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.1024

    Random

    http://random.mat.sbg.ac.at/results/karl/server/node4.html#SECTION00042000000000000000 In case a better generator is needed, a Multiple Recursive Generator (MRG) or Composite Multiple Recursive Generator (CMRG) should be used.

  42. case class RandomMatD(dim1: Int = 5, dim2: Int = 10, max: Double = 20.0, min: Double = 0.0, density: Double = 1.0, stream: Int = 0) extends VariateMat with Product with Serializable

    The RandomMatD class generates a random matrix of doubles.

    The RandomMatD class generates a random matrix of doubles.

    dim1

    the number of rows in the matrix

    dim2

    the number of columns in the matrix

    max

    generate integers in the range 0 (inclusive) to max (inclusive)

    min

    generate integers in the range 0 (inclusive) to max (inclusive)

    density

    sparsity basis = 1 - density

    stream

    the random number stream

  43. case class RandomSet(count: Int = 10, max: Int = 20, skip: Int = -1, stream: Int = 0) extends VariateSet with Product with Serializable

    The RandomSet class generates a random set/subset of integers.

    The RandomSet class generates a random set/subset of integers.

    count

    the size of the set (number of integer elements)

    max

    generate integers in the range 0 (inclusive) to max (inclusive)

    skip

    skip this number, i.e, do not use it

    stream

    the random number stream

  44. case class RandomSetS(count: Int = 10, stream: Int = 0) extends VariateSet with Product with Serializable

    The RandomSetS class generates a random set/subset of strings.

    The RandomSetS class generates a random set/subset of strings.

    count

    the size of the set (number of strings)

    stream

    the random number stream

  45. case class RandomSetW(count: Int = 10, nWords: Int = 20, lRange: Range = 4 to 6, cRange: Range = 97 to 122, stream: Int = 0) extends VariateSet with Product with Serializable

    The RandomSetW class generates a random set/subset of words.

    The RandomSetW class generates a random set/subset of words.

    count

    the size of the set (number of words)

    nWords

    the numbers of words to predetermine.

    lRange

    the range of string lengths to generate

    cRange

    the range of characters to generate

    stream

    the random number stream

  46. case class RandomStr(lRange: Range = 4 to 7, cRange: Range = 97 to 122, stream: Int = 0) extends Variate with Product with Serializable

    The RandomStr class generates a random string.

    The RandomStr class generates a random string.

    lRange

    the range of string lengths to generate

    cRange

    the range of characters to generate

    stream

    the random number stream

  47. case class RandomVecD(dim: Int = 10, max: Double = 20.0, min: Double = 0.0, density: Double = 1.0, runLength: Int = 10, stream: Int = 0) extends VariateVec with Product with Serializable

    The RandomVecD class generates a random vector of doubles.

    The RandomVecD class generates a random vector of doubles. Ex: (3.0, 2.0, 0.0, 4.0, 1.0) has 'dim' = 5 and 'max' = 4.

    dim

    the dimension/size of the vector (number of elements)

    max

    generate integers in the range min (inclusive) to max (inclusive)

    min

    generate integers in the range min (inclusive) to max (inclusive)

    density

    sparsity basis = 1 - density

    runLength

    the maximum run length

    stream

    the random number stream

  48. case class RandomVecI(dim: Int = 10, max: Int = 20, min: Int = 10, skip: Int = -1, unique: Boolean = true, stream: Int = 0) extends VariateVec with Product with Serializable

    The RandomVecI class generates a random vector of integers.

    The RandomVecI class generates a random vector of integers. Ex: (3, 2, 0, 4, 1) has 'dim' = 5 and 'max' = 4.

    dim

    the dimension/size of the vector (number of elements)

    max

    generate integers in the range min (inclusive) to max (inclusive)

    min

    generate integers in the range min (inclusive) to max (inclusive)

    skip

    skip this number, i.e, do not use it

    unique

    whether the integers must be unique

    stream

    the random number stream

  49. case class RandomVecS(dim: Int = 10, unique: Boolean = true, stream: Int = 0) extends VariateVec with Product with Serializable

    The RandomVecS class generates a random vector of strings.

    The RandomVecS class generates a random vector of strings. Ex: ("3", "2", "0", "4", "1") has 'dim' = 5 and 'max' = 4.

    dim

    the dimension/size of the vector (number of elements)

    unique

    whether the strings must be unique

    stream

    the random number stream

  50. case class RandomVecSample(pop: Int, samp: Int, stream: Int = 0) extends VariateVec with Product with Serializable

    The RandomVecSample class generates random sample from a population.

    The RandomVecSample class generates random sample from a population.

    pop

    the size of the population (0, 1, ... pop-1)

    samp

    the size of the random samples

    stream

    the random number stream

  51. case class RandomWord(nWords: Int = 10, lRange: Range = 4 to 6, cRange: Range = 97 to 122, stream: Int = 0) extends Variate with Product with Serializable

    The RandomStr class generates a random word from a predetermined set.

    The RandomStr class generates a random word from a predetermined set.

    nWords

    the numbers of words to predetermine.

    lRange

    the range of string lengths to generate

    cRange

    the range of characters to generate

    stream

    the random number stream

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

    This class generates Sharp (Deterministic) random variates.

    This class generates Sharp (Deterministic) random variates. This discrete RV models the case when the variance is 0.

    x

    the value for this constant distribution

    stream

    the random number stream

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

    This class generates StudentT (Student's t) random variates.

    This class generates StudentT (Student's t) random variates. This continuous RV models cases where data are normally distributed, but variability increases since the variance is unknown.

    df

    the degrees of freedom

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Student.html

  54. abstract class TimeVariate extends Variate

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

  55. 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.

    This class generates Trapezoidal random variates. This continuous RV models cases where outcomes cluster between two modes. Both Uniform and Triangular are special cases of Trapezoidal.

    a

    the minimum

    c

    the first mode

    d

    the second mode

    b

    the maximum

    stream

    the random number stream

    See also

    iopscience.iop.org/0026-1394/44/2/003/pdf/0026-1394_44_2_003.pdf

  56. 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.

    This class generates simple Triangular random variates with the mode in the middle. This continuous RV models cases where outcomes cluster around the mode.

    a

    the lower bound

    b

    the upper bound

    c

    the mode

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Triangle.html

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

    This class generates Trinomial random variates.

    This class generates Trinomial random variates. While Binomial is based on trials with two outcomes, success (1) or failure (0). Trinomial is based on trials with three outcomes, high (2), medium (1) or low (0). This discrete RV models the result of 'n' trials.

    p

    the probability of high (2)

    q

    the probability of medium (1)

    n

    the number of independent trials

    stream

    the random number stream

    See also

    onlinecourses.science.psu.edu/stat414/node/106 FIX - fails distribution test - maybe due to 'pf' method

  58. 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).

    This class generates Uniform random variates in the range (a, b). This continuous RV models equi-probable outcomes.

    a

    the lower bound

    b

    the upper bound

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/UniformContinuous.html

  59. abstract class Variate extends Error

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

    The Variate abstract class serves as a base class for all the random variate (RV) generators. They use one of the Random Number Generators (RNG's) from Random to generate numbers following their particular distribution. Random Variate Generators (RVG's) for thirty popular probability distributions are implemented as extensions of Variate. Still need to add one.

    See also

    VariateVec for Random MultiVariate Generators (RMVG's). -----------------------------------------------------------------------------

    http://www.math.uah.edu/stat/special/index.html

  60. abstract class VariateMat extends Error

    The VariateMat abstract class serves as a base class for all the random variate matrix (RVM) generators.

    The VariateMat abstract class serves as a base class for all the random variate matrix (RVM) generators. They use one of the Random Number Generators (RNG's) from Random.scala to generate numbers following their particular multivariate distribution. -----------------------------------------------------------------------------

  61. abstract class VariateSet extends Error

    The VariateSet abstract class serves as a base class for all the random variate set (RVS) generators.

    The VariateSet abstract class serves as a base class for all the random variate set (RVS) generators. They use one of the Random Number Generators (RNG's) from Random.scala to generate numbers following their particular multivariate distribution. -----------------------------------------------------------------------------

  62. abstract class VariateVec extends Error

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

    The VariateVec abstract class serves as a base class for all the random variate vector (RVV) generators. They use one of the Random Number Generators (RNG's) from Random.scala to generate numbers following their particular multivariate distribution. -----------------------------------------------------------------------------

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

    This class generates Weibull random variates.

    This class generates Weibull random variates. This continuous RV models the time for an event to occur.

    alpha

    the shape parameter

    beta

    the scale parameter

    stream

    the random number stream

    See also

    http://www.math.uah.edu/stat/special/Weibull.html

  64. 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.

    This class generates HyperExponential random variates. This continuous RV models the time until an event occurs (higher coefficient of variation than exponential distribution). FIX

    mu

    the mean

    sigma

    the standard deviation

    stream

    the random number stream

Value Members

  1. object CDF extends Error

    The CDF object contains methods for computing 'F(x)', the Cumulative Distribution Functions 'CDF's for popular distributions: Uniform Exponential Weibel Empirical StandardNormal StudentT ChiSquare Fisher For a given CDF 'F' with argument 'x', compute 'p = F(x)'.

  2. object CDFTest_ChiSquare extends App with CDFTest

    The CDFTest_ChiSquare object is used to test the 'chiSquareCDF' method in the CDF object.

    The CDFTest_ChiSquare object is used to test the 'chiSquareCDF' method in the CDF object. > runMain scalation.random.CDFTest_ChiSquare

  3. object CDFTest_Empirical extends App

    The CDFTest_Empirical object is used to test the 'buildEmpiricalCDF' method in the CDF object.

    The CDFTest_Empirical object is used to test the 'buildEmpiricalCDF' method in the CDF object. > runMain scalation.random.CDFTest_Empirical

  4. object CDFTest_Exponential extends App with CDFTest

    The CDFTest_Exponential object is used to test the 'ExponentialCDF' method in the CDF object.

    The CDFTest_Exponential object is used to test the 'ExponentialCDF' method in the CDF object. > runMain scalation.random.CDFTest_Exponential

  5. object CDFTest_Fisher extends App with CDFTest

    The CDFTest_Fisher object is used to test the 'fisherCDF' method in the CDF object.

    The CDFTest_Fisher object is used to test the 'fisherCDF' method in the CDF object. > runMain scalation.random.CDFTest_Fisher

  6. object CDFTest_Normal extends App with CDFTest

    The CDFTest_Normal object is used to test the 'normalCDF' method in the CDF object.

    The CDFTest_Normal object is used to test the 'normalCDF' method in the CDF object. > runMain scalation.random.CDFTest_Normal

  7. object CDFTest_Normal_Diff extends App with CDFTest

    The CDFTest_Normal object is used to test difference between different implementations of the 'normalCDF' method in the CDF object.

    The CDFTest_Normal object is used to test difference between different implementations of the 'normalCDF' method in the CDF object. > runMain scalation.random.CDFTest_Normal_Diff

  8. object CDFTest_StudentT extends App with CDFTest

    The CDFTest_StudentT object is used to test the 'studentTCDF' method in the CDF object.

    The CDFTest_StudentT object is used to test the 'studentTCDF' method in the CDF object. > runMain scalation.random.CDFTest_StudentT

  9. object CDFTest_Uniform extends App with CDFTest

    The CDFTest_Uniform object is used to test the 'UniformCDF' method in the CDF object.

    The CDFTest_Uniform object is used to test the 'UniformCDF' method in the CDF object. > runMain scalation.random.CDFTest_Uniform

  10. object CDFTest_Weibull extends App with CDFTest

    The CDFTest_Weibull object is used to test the 'WeibullCDF' method in the CDF object.

    The CDFTest_Weibull object is used to test the 'WeibullCDF' method in the CDF object. > runMain scalation.random.CDFTest_Weibull

  11. object CLTTest extends App

    The CLTTest is used to test the Uniform random variate generator for the illustrating the Central Lmiit Theorem.

    The CLTTest is used to test the Uniform random variate generator for the illustrating the Central Lmiit Theorem. Try adding difference numbers of random values and other distributions. > runMain scalation.random.CLTTest

  12. object DiceTest extends App

    The DiceTest is used to test the Randi random variate generator for the case of rolling two dice.

    The DiceTest is used to test the Randi random variate generator for the case of rolling two dice. The probability mass function (pmf) is plotted. > runMain scalation.random.DiceTest

  13. object PoissonProcessTest extends App

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

  14. 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.

    The Quantile object contains methods for computing 'Finv', the "inverse" Cumulative Distribution Functions (iCDF's) for popular sampling distributions: StandardNormal, StudentT, ChiSquare and Fisher. For a given CDF 'F' and probability/quantile 'p', compute 'x' such that 'F(x) = p'. The iCDF may be thought of as giving value of 'x' for which the area under the curve from -infinity to 'x' of the probability density function (pdf) is equal to 'p'.

  15. object QuantileTest_ChiSquare extends App with QuantileTest

    The QuantileTest_ChiSquare object is used to test the 'chiSquareInv' method in the Quantile object.

    The QuantileTest_ChiSquare object is used to test the 'chiSquareInv' method in the Quantile object. > runMain scalation.random.QuantileTest_ChiSquare

  16. object QuantileTest_Empirical extends App with QuantileTest

    The QuantileTest_Empirical object is used to test the 'empiricalInv' method in the Quantile object.

    The QuantileTest_Empirical object is used to test the 'empiricalInv' method in the Quantile object. > runMain scalation.random.QuantileTest_Empirical

  17. object QuantileTest_Exponential extends App with QuantileTest

    The QuantileTest_Exponential object is used to test the 'exponentialInv' method in the Quantile object.

    The QuantileTest_Exponential object is used to test the 'exponentialInv' method in the Quantile object. > runMain scalation.random.QuantileTest_Exponential

  18. object QuantileTest_Fisher extends App with QuantileTest

    The QuantileTest_Fisher object is used to test the 'fisherInv' method in the Quantile object.

    The QuantileTest_Fisher object is used to test the 'fisherInv' method in the Quantile object. > runMain scalation.random.QuantileTest_Fisher

  19. object QuantileTest_Normal extends App with QuantileTest

    The QuantileTest_Normal object is used to test the 'normalInv' method in the Quantile object.

    The QuantileTest_Normal object is used to test the 'normalInv' method in the Quantile object. > runMain scalation.random.QuantileTest_Normal

  20. object QuantileTest_StudentT extends App with QuantileTest

    The QuantileTest_StudentT object is used to test the 'studentTInv' method in the Quantile object.

    The QuantileTest_StudentT object is used to test the 'studentTInv' method in the Quantile object. > runMain scalation.random.QuantileTest_StudentT

  21. object QuantileTest_Uniform extends App with QuantileTest

    The QuantileTest_Uniform object is used to test the 'uniformInv' method in the Quantile object.

    The QuantileTest_Uniform object is used to test the 'uniformInv' method in the Quantile object. > runMain scalation.random.QuantileTest_Uniform

  22. object RNGStream

    The RNGStream object allows for random selection of streams for applications where reproducibility of random numbers is not desired.

  23. object RNGTest extends App with Error

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

    The RNGTest object conducts three simple tests of the Random Number Generators: (1) Speed Test, (2) Means Test and (3) Chi-square Goodness of Fit Test. FIX: need to add (3) Variance Test and (4) K-S Goodness of Fit Test. > runMain scalation.random.RNGTest

  24. object RandomSeeds

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

  25. object RandomSeeds3

    The first 1000 seeds for the LCG random number generator.

  26. object RandomStrTest extends App

    The RandomStrTest object is used to test the Random Variate String (RVS) generator from the RandomStr class.

    The RandomStrTest object is used to test the Random Variate String (RVS) generator from the RandomStr class. > runMain scalation.random.RandomStrTest

  27. object RandomWordTest extends App

    The RandomWordTest object is used to test the Random Variate Word (RVW) generator from the RandomWord class.

    The RandomWordTest object is used to test the Random Variate Word (RVW) generator from the RandomWord class. > runMain scalation.random.RandomWordTest

  28. object StreamMaker

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

    The StreamMaker object computes seeds for Random and Random2, both of which implement the 'MRG31k3p' random number generator. This generator has a period length around 2^185. Each seed is a 6-dimensional vector of 32-bit integers.

    See also

    http://www.iro.umontreal.ca/~simardr/ssj/indexe.html

  29. object StreamMaker3 extends App

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

    The StreamMaker3 object finds seeds for the Random3 random number generator. This generator has a period length around 2^31. Each seed is a 32-bit integer.

  30. object StreamMakerGen extends App

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

  31. object VariateMat

    The VariateMat companion object provides a method to add correlation to a matrix.

  32. object VariateMatTest extends App

    The VariateMatTest object is used to test the Random Variate Matrix (RVM) generators from the classes derived from VariateMat.

    The VariateMatTest object is used to test the Random Variate Matrix (RVM) generators from the classes derived from VariateMat. > runMain scalation.random.VariateMatTest

  33. object VariateSetTest extends App

    The VariateSetTest object is used to test the Random Variate Set (RVS) generators from the classes derived from VariateSet.

    The VariateSetTest object is used to test the Random Variate Set (RVS) generators from the classes derived from VariateSet. > runMain scalation.random.VariateSetTest

  34. object VariateSetTest2 extends App

    The VariateSetTest2 object is used to test the Random Variate Set (RVS) generators from the classes derived from VariateSet.

    The VariateSetTest2 object is used to test the Random Variate Set (RVS) generators from the classes derived from VariateSet. > runMain scalation.random.VariateSetTest2

  35. object VariateSetTest3 extends App

    The VariateSetTest3 object is used to test the Random Variate Set (RVS) generators from the classes derived from VariateSet.

    The VariateSetTest3 object is used to test the Random Variate Set (RVS) generators from the classes derived from VariateSet. > runMain scalation.random.VariateSetTest3

  36. 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.

    The VariateTest object conducts two simple tests of the Random Variate Generators: (1) Means Test and (2) Chi-square Goodness of Fit Test. FIX: need to add (3) Variance Test and (4) K-S Goodness of Fit Test. > runMain scalation.random.VariateTest

  37. object VariateVecTest extends App

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped