simulation::random - Pseudo-random number generators
This package consists of commands to generate pseudo-random number generators. These new commands deliver
numbers that are distributed normally, uniformly, according to a Pareto or Gumbel distribution and so on
coordinates of points uniformly spread inside a sphere or a rectangle
For example:
set p [::simulation::random::prng_Normal -1.0 10.0]
produces a new command (whose name is stored in the variable "p") that generates normally distributed numbers with a mean of -1.0 and a standard deviation of 10.0.
The package defines the following public procedures for discrete distributions:
Create a command (PRNG) that generates numbers with a Bernoulli distribution: the value is either 1 or 0, with a chance p to be 1
Chance the outcome is 1
Create a command (PRNG) that generates numbers 0 to n-1 with equal probability.
Number of different values (ranging from 0 to n-1)
Create a command (PRNG) that generates numbers according to the Poisson distribution.
Mean number per time interval
The package defines the following public procedures for continuous distributions:
Create a command (PRNG) that generates uniformly distributed numbers between "min" and "max".
Minimum number that will be generated
Maximum number that will be generated
Create a command (PRNG) that generates triangularly distributed numbers between "min" and "max". If the argument min is lower than the argument max, then smaller values have higher probability and vice versa. In the first case the probability density function is of the form f(x) = 2(1-x) and the other case it is of the form f(x) = 2x.
Minimum number that will be generated
Maximum number that will be generated
Create a command (PRNG) that generates numbers distributed according to a symmetric triangle around the mean of "min" and "max".
Minimum number that will be generated
Maximum number that will be generated
Create a command (PRNG) that generates exponentially distributed numbers with a given minimum value and a given mean value.
Minimum number that will be generated
Mean value for the numbers
Create a command (PRNG) that generates normally distributed numbers with a given mean value and a given standard deviation.
Mean value for the numbers
Standard deviation
Create a command (PRNG) that generates numbers distributed according to Pareto with a given minimum value and a given distribution steepness.
Minimum number that will be generated
Steepness of the distribution
Create a command (PRNG) that generates numbers distributed according to Gumbel with a given minimum value and a given scale factor. The probability density function is:
P(v) = exp( -exp(f*(v-min)))
Minimum number that will be generated
Scale factor for the values
Create a command (PRNG) that generates numbers distributed according to the chi-squared distribution with df degrees of freedom. The mean is 0 and the standard deviation is 1.
Degrees of freedom
The package defines the following public procedures for random point sets:
Create a command (PRNG) that generates (x,y)-coordinates for points uniformly spread over a disk of given radius.
Radius of the disk
Create a command (PRNG) that generates (x,y,z)-coordinates for points uniformly spread over the surface of a sphere of given radius.
Radius of the disk
Create a command (PRNG) that generates (x,y,z)-coordinates for points uniformly spread within a ball of given radius.
Radius of the ball
Create a command (PRNG) that generates (x,y)-coordinates for points uniformly spread over a rectangle.
Length of the rectangle (x-direction)
Width of the rectangle (y-direction)
Create a command (PRNG) that generates (x,y,z)-coordinates for points uniformly spread over a block
Length of the block (x-direction)
Width of the block (y-direction)
Depth of the block (z-direction)
Mathematics
Copyright © 2004 Arjen Markus <arjenmarkus@users.sourceforge.net>