package stat
- Alphabetic
- Public
- Protected
Type Members
- class Bernoulli extends Rng[Boolean]
Boolean distribution: generates
true
with probabilityp
andfalse
with probabilty1-p
.Boolean distribution: generates
true
with probabilityp
andfalse
with probabilty1-p
.- Exceptions thrown
IllegalArgumentException
if p not in[0, 1]
- class Cauchy extends Rng[Double]
Generates values conforming to a standard Cauchy (or Lorentz) distribution.
Generates values conforming to a standard Cauchy (or Lorentz) distribution.
- class Discrete extends Rng[Int]
Draws values from a discrete distribution given by an array a of probabilities.
Draws values from a discrete distribution given by an array a of probabilities.
More precise, if n=a.length, a value i with i in {0, ..., n-1} is drawn with probability ai.
- Exceptions thrown
IllegalArgumentException
if an element of a is negative or the sum over all elements of a is not 1 (within machine accuracy)
- class DoubleUniform extends Rng[Double]
Generates uniformly distributed
Double
values in[a, b)
.Generates uniformly distributed
Double
values in[a, b)
.- Exceptions thrown
IllegalArgumentException
if not a less than b
- class Exponential extends Rng[Double]
Generates values conforming to an exponential distribution with rate parameter λ.
Generates values conforming to an exponential distribution with rate parameter λ.
- Exceptions thrown
IllegalArgumentException
if lambda less than or equal to 0- See also
- class Gaussian extends Rng[Double]
Generates values conforming to a normal (or Gaussian) distribution with given mean and standard deviation
- class Geometric extends Rng[Int]
Generates values conforming to a geometric distribution with mean
1/p
.Generates values conforming to a geometric distribution with mean
1/p
.- Exceptions thrown
IllegalArgumentException
if p not in[0, 1]
- class IntUniform extends Rng[Int]
Generates uniformly distributed
Int
values in{a, b-1}
.Generates uniformly distributed
Int
values in{a, b-1}
.- Exceptions thrown
IllegalArgumentException
if not a less than b
- class Lomax extends Rng[Double]
Generates values conforming to a Lomax (shifted Pareto) distribution with shape parameter α and scala parameter λ.
Generates values conforming to a Lomax (shifted Pareto) distribution with shape parameter α and scala parameter λ.
- Exceptions thrown
IllegalArgumentException
if alpha or xmin not positive- See also
- class LongUniform extends Rng[Long]
Generates uniformly distributed
Long
values in{a, b-1}
.Generates uniformly distributed
Long
values in{a, b-1}
.- Exceptions thrown
IllegalArgumentException
if not a less than b
- class Pareto extends Rng[Double]
Generates values conforming to a Pareto distribution with shape parameter α and minimum value xmin.
Generates values conforming to a Pareto distribution with shape parameter α and minimum value xmin.
- Exceptions thrown
IllegalArgumentException
if alpha or xmin not positive- See also
- class Poisson extends Rng[Int]
Generates values conforming to a Poisson distribution Pλ(k) = (λk/k!)e-λ.
Generates values conforming to a Poisson distribution Pλ(k) = (λk/k!)e-λ.
The Poisson distribution yields the probability of the occurence of k events within a certain period of time, assuming that λ denotes the average occurence of events during that period and privided that events are independent of the time since the last event.
It turns out that λ is both the expected value and the variance of the distribution.
- Exceptions thrown
IllegalArgumentException
if lambda not positive or not finite- See also
- trait Rng[A] extends AnyRef
Defines a basic random-number-generator trait to be used by various concrete generators implementing specific probability distributions.
Value Members
- object Bernoulli
Generates
p
-distributed Boolean values. - object Cauchy
- object Discrete
- object Exponential
- object Gaussian
- object Geometric
- object Lomax
- object Lorentz
- object Pareto
- object Poisson
- object Shuffle
Randomly shuffles the elements of an array in place.
Randomly shuffles the elements of an array in place.
- object Uniform
Generates uniformly distributed values.