Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Erlang

Represents a random variable with an Erlang distribution with given shape and scale parameters.

The expected (mean) value of an Erlang random variable is equal to the product of its shape and scale parameters.

The Erlang distribution corresponds to the sum of shape independent Exponential variables.

For more information on exponential distributions see exponential distribution.

Hierarchy

Index

Constructors

Accessors

Methods

Constructors

constructor

  • new Erlang(shape: number, scale: number, seed?: number): Erlang
  • Initializes a new instance of the Erlang class.

    Parameters

    • shape: number

      Shape parameter (integer, greater than zero).

    • scale: number

      Scale parameter (mean value of the Exponential distribution).

    • Optional seed: number

      Optional value used to initialize the random sequence.

    Returns Erlang

Accessors

mean

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

    Returns number

scale

  • get scale(): number
  • Gets the value of the scale parameter.

    Returns number

shape

  • get shape(): number
  • Gets the value of the shape parameter.

    Returns number

Methods

sample

  • sample(): number
  • Gets a random value that follows an exponential distribution with a given mean.

    Returns number

Generated using TypeDoc