make-numbers
TypeScript icon, indicating that this package has built-in type declarations

1.12.0 • Public • Published

Make Numbers

This is a simplistic random variate generator library written in Typescript and compiled to Javascript for distribution. The latest version is always available at https://www.npmjs.com/package/make-numbers.

Install

To install the library, first ensure that you have Npm set up, then simply run

npm install make-numbers

You can import the library into your project using:

const numbers = require('make-numbers')
 
const normalRV = numbers.normal(mean, stdev)

Configuration

The library exports a setSeed() method which allows you to set the seed of the pseudorandom number generator before conducting your experiments. This allows you to create repeatable experiments by generating a sequence of random numbers repeatably.

Distributions

Normal

const normalRV = numbers.normal(mean, stdev)

Triangular

const triangularRV = numbers.triangular(mode, left, right)

Erlang

const erlangRV = numbers.erlang(n, shape)

Exponential

const exponentialRV = numbers.exponential(lambda)

Weibull

const weibullRV = numbers.weibull(lambda, shape)

Geometric

const geometricRV = numbers.geometric(probabilityOfSuccess)

Negative Binomial

const negbinRV = numbers.negbin(numberOfFailures, probabilityOfSuccess)

Poisson

const poissonRV = numbers.poisson(lambda)

API

Table of Contents

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i make-numbers

Weekly Downloads

12

Version

1.12.0

License

MIT

Unpacked Size

67.6 kB

Total Files

54

Last publish

Collaborators

  • rjchow