Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 238 additions & 0 deletions lib/node_modules/@stdlib/random/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand All @@ -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' );
Expand Down Expand Up @@ -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 <ndarray>
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var out = zeros( [ 3, 3 ] );
* // returns <ndarray>
*
* var v = ns.bernoulli.assign( 0.5, out );
* // returns <ndarray>
*
* var bool = ( v === out );
* // returns true
*
* @example
* var random = ns.bernoulli.factory();
*
* var out = random( [ 3, 3 ], 0.5 );
* // returns <ndarray>
*/
bernoulli: typeof bernoulli;

/**
* Generates pseudorandom numbers drawn from a beta distribution.
*
Expand Down Expand Up @@ -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 <ndarray>
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var out = zeros( [ 3, 3 ] );
* // returns <ndarray>
*
* var v = ns.chi.assign( 2.0, out );
* // returns <ndarray>
*
* var bool = ( v === out );
* // returns true
*
* @example
* var random = ns.chi.factory();
*
* var out = random( [ 3, 3 ], 2.0 );
* // returns <ndarray>
*/
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 <ndarray>
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var out = zeros( [ 3, 3 ] );
* // returns <ndarray>
*
* var v = ns.chisquare.assign( 2.0, out );
* // returns <ndarray>
*
* var bool = ( v === out );
* // returns true
*
* @example
* var random = ns.chisquare.factory();
*
* var out = random( [ 3, 3 ], 2.0 );
* // returns <ndarray>
*/
chisquare: typeof chisquare;

/**
* Generates pseudorandom numbers drawn from a raised cosine distribution.
*
Expand Down Expand Up @@ -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 <ndarray>
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var out = zeros( [ 3, 3 ] );
* // returns <ndarray>
*
* var v = ns.geometric.assign( 0.01, out );
* // returns <ndarray>
*
* var bool = ( v === out );
* // returns true
*
* @example
* var random = ns.geometric.factory();
*
* var out = random( [ 3, 3 ], 0.01 );
* // returns <ndarray>
*/
geometric: typeof geometric;

/**
* Generates pseudorandom numbers drawn from a Gumbel distribution.
*
Expand Down Expand Up @@ -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 <ndarray>
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var out = zeros( [ 3, 3 ] );
* // returns <ndarray>
*
* var v = ns.poisson.assign( 2.0, out );
* // returns <ndarray>
*
* var bool = ( v === out );
* // returns true
*
* @example
* var random = ns.poisson.factory();
*
* var out = random( [ 3, 3 ], 2.0 );
* // returns <ndarray>
*/
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 <ndarray>
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var out = zeros( [ 3, 3 ] );
* // returns <ndarray>
*
* var v = ns.rayleigh.assign( 2.0, out );
* // returns <ndarray>
*
* var bool = ( v === out );
* // returns true
*
* @example
* var random = ns.rayleigh.factory();
*
* var out = random( [ 3, 3 ], 2.0 );
* // returns <ndarray>
*/
rayleigh: typeof rayleigh;

/**
* Samples elements from an array-like object.
*
Expand Down Expand Up @@ -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 <ndarray>
*
* @example
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var out = zeros( [ 3, 3 ] );
* // returns <ndarray>
*
* var v = ns.t.assign( 2.0, out );
* // returns <ndarray>
*
* var bool = ( v === out );
* // returns true
*
* @example
* var random = ns.t.factory();
*
* var out = random( [ 3, 3 ], 2.0 );
* // returns <ndarray>
*/
t: typeof t;

/**
* Pseudorandom number generator ndarray creation function tools.
*/
Expand Down
Loading