Pgauss:
Filter:
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

Instance Methods

Inherited instance methods

Undocumented instance methods

.dev

.dev = value

.embedInStream(inval)

.length

.length = value

.mean

.mean = value

Examples