diff --git a/lib/node_modules/@stdlib/random/docs/types/index.d.ts b/lib/node_modules/@stdlib/random/docs/types/index.d.ts index c3d261536d00..32a618de910e 100644 --- a/lib/node_modules/@stdlib/random/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/random/docs/types/index.d.ts @@ -23,16 +23,20 @@ import arcsine = require( '@stdlib/random/arcsine' ); import array = require( '@stdlib/random/array' ); import base = require( '@stdlib/random/base' ); +import bernoulli = require( '@stdlib/random/bernoulli' ); import beta = require( '@stdlib/random/beta' ); import betaprime = require( '@stdlib/random/betaprime' ); import binomial = require( '@stdlib/random/binomial' ); import cauchy = require( '@stdlib/random/cauchy' ); +import chi = require( '@stdlib/random/chi' ); +import chisquare = require( '@stdlib/random/chisquare' ); import cosine = require( '@stdlib/random/cosine' ); import discreteUniform = require( '@stdlib/random/discrete-uniform' ); import erlang = require( '@stdlib/random/erlang' ); import exponential = require( '@stdlib/random/exponential' ); import f = require( '@stdlib/random/f' ); import gamma = require( '@stdlib/random/gamma' ); +import geometric = require( '@stdlib/random/geometric' ); import gumbel = require( '@stdlib/random/gumbel' ); import invgamma = require( '@stdlib/random/invgamma' ); import iterators = require( '@stdlib/random/iter' ); @@ -44,10 +48,13 @@ import lognormal = require( '@stdlib/random/lognormal' ); import negativeBinomial = require( '@stdlib/random/negative-binomial' ); import normal = require( '@stdlib/random/normal' ); import pareto1 = require( '@stdlib/random/pareto-type1' ); +import poisson = require( '@stdlib/random/poisson' ); +import rayleigh = require( '@stdlib/random/rayleigh' ); import sample = require( '@stdlib/random/sample' ); import shuffle = require( '@stdlib/random/shuffle' ); import streams = require( '@stdlib/random/streams' ); import strided = require( '@stdlib/random/strided' ); +import t = require( '@stdlib/random/t' ); import tools = require( '@stdlib/random/tools' ); import uniform = require( '@stdlib/random/uniform' ); import weibull = require( '@stdlib/random/weibull' ); @@ -100,6 +107,39 @@ interface Namespace { */ base: typeof base; + /** + * Generates pseudorandom numbers drawn from a Bernoulli distribution. + * + * @param shape - output shape + * @param p - success probability + * @param options - function options + * @throws distribution parameters and the output shape must be broadcast compatible + * @returns output ndarray + * + * @example + * var out = ns.bernoulli( [ 3, 3 ], 0.5 ); + * // returns + * + * @example + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var out = zeros( [ 3, 3 ] ); + * // returns + * + * var v = ns.bernoulli.assign( 0.5, out ); + * // returns + * + * var bool = ( v === out ); + * // returns true + * + * @example + * var random = ns.bernoulli.factory(); + * + * var out = random( [ 3, 3 ], 0.5 ); + * // returns + */ + bernoulli: typeof bernoulli; + /** * Generates pseudorandom numbers drawn from a beta distribution. * @@ -236,6 +276,72 @@ interface Namespace { */ cauchy: typeof cauchy; + /** + * Generates pseudorandom numbers drawn from a chi distribution. + * + * @param shape - output shape + * @param k - degrees of freedom + * @param options - function options + * @throws distribution parameters and the output shape must be broadcast compatible + * @returns output ndarray + * + * @example + * var out = ns.chi( [ 3, 3 ], 2.0 ); + * // returns + * + * @example + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var out = zeros( [ 3, 3 ] ); + * // returns + * + * var v = ns.chi.assign( 2.0, out ); + * // returns + * + * var bool = ( v === out ); + * // returns true + * + * @example + * var random = ns.chi.factory(); + * + * var out = random( [ 3, 3 ], 2.0 ); + * // returns + */ + chi: typeof chi; + + /** + * Generates pseudorandom numbers drawn from a chi-square distribution. + * + * @param shape - output shape + * @param k - degrees of freedom + * @param options - function options + * @throws distribution parameters and the output shape must be broadcast compatible + * @returns output ndarray + * + * @example + * var out = ns.chisquare( [ 3, 3 ], 2.0 ); + * // returns + * + * @example + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var out = zeros( [ 3, 3 ] ); + * // returns + * + * var v = ns.chisquare.assign( 2.0, out ); + * // returns + * + * var bool = ( v === out ); + * // returns true + * + * @example + * var random = ns.chisquare.factory(); + * + * var out = random( [ 3, 3 ], 2.0 ); + * // returns + */ + chisquare: typeof chisquare; + /** * Generates pseudorandom numbers drawn from a raised cosine distribution. * @@ -439,6 +545,39 @@ interface Namespace { */ gamma: typeof gamma; + /** + * Generates pseudorandom numbers drawn from a geometric distribution. + * + * @param shape - output shape + * @param p - success probability + * @param options - function options + * @throws distribution parameters and the output shape must be broadcast compatible + * @returns output ndarray + * + * @example + * var out = ns.geometric( [ 3, 3 ], 0.01 ); + * // returns + * + * @example + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var out = zeros( [ 3, 3 ] ); + * // returns + * + * var v = ns.geometric.assign( 0.01, out ); + * // returns + * + * var bool = ( v === out ); + * // returns true + * + * @example + * var random = ns.geometric.factory(); + * + * var out = random( [ 3, 3 ], 0.01 ); + * // returns + */ + geometric: typeof geometric; + /** * Generates pseudorandom numbers drawn from a Gumbel distribution. * @@ -784,6 +923,72 @@ interface Namespace { */ pareto1: typeof pareto1; + /** + * Generates pseudorandom numbers drawn from a Poisson distribution. + * + * @param shape - output shape + * @param lambda - mean parameter + * @param options - function options + * @throws distribution parameters and the output shape must be broadcast compatible + * @returns output ndarray + * + * @example + * var out = ns.poisson( [ 3, 3 ], 2.0 ); + * // returns + * + * @example + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var out = zeros( [ 3, 3 ] ); + * // returns + * + * var v = ns.poisson.assign( 2.0, out ); + * // returns + * + * var bool = ( v === out ); + * // returns true + * + * @example + * var random = ns.poisson.factory(); + * + * var out = random( [ 3, 3 ], 2.0 ); + * // returns + */ + poisson: typeof poisson; + + /** + * Generates pseudorandom numbers drawn from a Rayleigh distribution. + * + * @param shape - output shape + * @param sigma - scale parameter + * @param options - function options + * @throws distribution parameters and the output shape must be broadcast compatible + * @returns output ndarray + * + * @example + * var out = ns.rayleigh( [ 3, 3 ], 2.0 ); + * // returns + * + * @example + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var out = zeros( [ 3, 3 ] ); + * // returns + * + * var v = ns.rayleigh.assign( 2.0, out ); + * // returns + * + * var bool = ( v === out ); + * // returns true + * + * @example + * var random = ns.rayleigh.factory(); + * + * var out = random( [ 3, 3 ], 2.0 ); + * // returns + */ + rayleigh: typeof rayleigh; + /** * Samples elements from an array-like object. * @@ -836,6 +1041,39 @@ interface Namespace { */ strided: typeof strided; + /** + * Generates pseudorandom numbers drawn from a Student's t-distribution. + * + * @param shape - output shape + * @param v - degrees of freedom + * @param options - function options + * @throws distribution parameters and the output shape must be broadcast compatible + * @returns output ndarray + * + * @example + * var out = ns.t( [ 3, 3 ], 2.0 ); + * // returns + * + * @example + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var out = zeros( [ 3, 3 ] ); + * // returns + * + * var v = ns.t.assign( 2.0, out ); + * // returns + * + * var bool = ( v === out ); + * // returns true + * + * @example + * var random = ns.t.factory(); + * + * var out = random( [ 3, 3 ], 2.0 ); + * // returns + */ + t: typeof t; + /** * Pseudorandom number generator ndarray creation function tools. */