Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Normal

Represents a random variable with a Normal distribution with given mean and standard deviation values.

For more information on the Normal distribution see Normal distribution.

Hierarchy

Index

Constructors

Accessors

Methods

Constructors

constructor

  • new Normal(mean: number, std: number, positive?: boolean, seed?: number): Normal
  • Initializes a new instance of the Normal class.

    Parameters

    • mean: number

      Mean generated value.

    • std: number

      Standard deviation of the generated values.

    • positive: boolean = true

      Always return values greater than or equal to zero.

    • Optional seed: number

      Optional value used to initialize the random sequence.

    Returns Normal

Accessors

mean

  • get mean(): number
  • Gets the mean value of the generated values.

    Returns number

std

  • get std(): number
  • Gets the standard deviation of the generated values.

    Returns number

Methods

sample

  • sample(): number
  • Gets a random value that follows a normal distribution with a given mean and standard deviation (std).

    Returns number

Generated using TypeDoc