Classes | Streams-Patterns-Events > Patterns > Random

Pgauss : Pattern : AbstractFunction : Object

random values that follow a Gaussian Distribution

Description

This pattern uses the Box-Muller transform to generate a gaussian distribution from uniformly distributed values: sqrt(-2 * log(1.0.rand)) * sin(2pi.rand)

Class Methods

Pgauss.new(mean: 0.0, dev: 1, length: inf)

Arguments:

mean

The mean of the distribution.

dev

The spread of values around the mean (standard deviation).

length

Number of values produced.

Inherited class methods

6 methods from Object ► show

Instance Methods

Inherited instance methods

43 methods from Pattern ► show
159 methods from AbstractFunction ► show
260 methods from Object ► show

Undocumented instance methods

.dev

.dev = value

.embedInStream(inval)

.length

.length = value

.mean

.mean = value

Examples