@stdlib/random-array
v0.2.1
Published
Pseudorandom number generator array creation functions.
Downloads
3
Readme
Array
Pseudorandom number generator (PRNG) array creation functions.
Installation
npm install @stdlib/random-array
Usage
var ns = require( '@stdlib/random-array' );
ns
Namespace containing array creation pseudorandom number generator (PRNG) functions.
var o = ns;
// returns {...}
The namespace contains the following:
arcsine( len, a, b[, options] )
: create an array containing pseudorandom numbers drawn from an arcsine distribution.bernoulli( len, p[, options] )
: create an array containing pseudorandom numbers drawn from a Bernoulli distribution.beta( len, alpha, beta[, options] )
: create an array containing pseudorandom numbers drawn from a beta distribution.betaprime( len, alpha, beta[, options] )
: create an array containing pseudorandom numbers drawn from a beta prime distribution.binomial( len, n, p[, options] )
: create an array containing pseudorandom numbers drawn from a binomial distribution.cauchy( len, x0, gamma[, options] )
: create an array containing pseudorandom numbers drawn from a Cauchy distribution.chi( len, k[, options] )
: create an array containing pseudorandom numbers drawn from a chi distribution.chisquare( len, k[, options] )
: create an array containing pseudorandom numbers drawn from a chi-square distribution.cosine( len, mu, s[, options] )
: create an array containing pseudorandom numbers drawn from a raised cosine distribution.discreteUniform( len, a, b[, options] )
: create an array containing pseudorandom numbers drawn from a discrete uniform distribution.erlang( len, k, lambda[, options] )
: create an array containing pseudorandom numbers drawn from an Erlang distribution.exponential( len, lambda[, options] )
: create an array containing pseudorandom numbers drawn from an exponential distribution.f( len, d1, d2[, options] )
: create an array containing pseudorandom numbers drawn from an F distribution.frechet( len, alpha, s, m[, options] )
: create an array containing pseudorandom numbers drawn from a Fréchet distribution.gamma( len, alpha, beta[, options] )
: create an array containing pseudorandom numbers drawn from a gamma distribution.geometric( len, p[, options] )
: create an array containing pseudorandom numbers drawn from a geometric distribution.gumbel( len, mu, beta[, options] )
: create an array containing pseudorandom numbers drawn from a Gumbel distribution.hypergeometric( len, N, K, n[, options] )
: create an array containing pseudorandom numbers drawn from a hypergeometric distribution.invgamma( len, alpha, beta[, options] )
: create an array containing pseudorandom numbers drawn from a inverse gamma distribution.kumaraswamy( len, a, b[, options] )
: create an array containing pseudorandom numbers drawn from Kumaraswamy's double bounded distribution.laplace( len, mu, b[, options] )
: create an array containing pseudorandom numbers drawn from a Laplace (double exponential) distribution.levy( len, mu, c[, options] )
: create an array containing pseudorandom numbers drawn from a Lévy distribution.logistic( len, mu, s[, options] )
: create an array containing pseudorandom numbers drawn from a logistic distribution.lognormal( len, mu, sigma[, options] )
: create an array containing pseudorandom numbers drawn from a lognormal distribution.minstdShuffle( len[, options] )
: create an array containing pseudorandom numbers generated using a linear congruential pseudorandom number generator (LCG) whose output is shuffled.minstd( len[, options] )
: create an array containing pseudorandom numbers generated using a linear congruential pseudorandom number generator (LCG).mt19937( len[, options] )
: create an array containing pseudorandom numbers generated using a 32-bit Mersenne Twister pseudorandom number generator.negativeBinomial( len, r, p[, options] )
: create an array containing pseudorandom numbers drawn from a negative binomial distribution.normal( len, mu, sigma[, options] )
: create an array containing pseudorandom numbers drawn from a normal distribution.pareto1( len, alpha, beta[, options] )
: create an array containing pseudorandom numbers drawn from a Pareto (Type I) distribution.poisson( len, lambda[, options] )
: create an array containing pseudorandom numbers drawn from a Poisson distribution.randu( len[, options] )
: create an array containing uniformly distributed pseudorandom numbers between0
and1
.rayleigh( len, sigma[, options] )
: create an array containing pseudorandom numbers drawn from a Rayleigh distribution.t( len, v[, options] )
: create an array containing pseudorandom numbers drawn from a Student's t-distribution.triangular( len, a, b, c[, options] )
: create an array containing pseudorandom numbers drawn from a triangular distribution.uniform( len, a, b[, options] )
: create an array containing pseudorandom numbers drawn from a continuous uniform distribution.weibull( len, k, lambda[, options] )
: create an array containing pseudorandom numbers drawn from a Weibull distribution.
Examples
var objectKeys = require( '@stdlib/utils-keys' );
var ns = require( '@stdlib/random-array' );
console.log( objectKeys( ns ) );
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.