Skip to content

Commit ef9c1b0

Browse files
authored
feat: update random TypeScript declarations
PR-URL: #9717 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 2cdca3d commit ef9c1b0

1 file changed

Lines changed: 108 additions & 0 deletions

File tree

  • lib/node_modules/@stdlib/random/docs/types

lib/node_modules/@stdlib/random/docs/types/index.d.ts

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ import discreteUniform = require( '@stdlib/random/discrete-uniform' );
3535
import erlang = require( '@stdlib/random/erlang' );
3636
import exponential = require( '@stdlib/random/exponential' );
3737
import f = require( '@stdlib/random/f' );
38+
import frechet = require( '@stdlib/random/frechet' );
3839
import gamma = require( '@stdlib/random/gamma' );
3940
import geometric = require( '@stdlib/random/geometric' );
4041
import gumbel = require( '@stdlib/random/gumbel' );
42+
import hypergeometric = require( '@stdlib/random/hypergeometric' );
4143
import invgamma = require( '@stdlib/random/invgamma' );
4244
import iterators = require( '@stdlib/random/iter' );
4345
import kumaraswamy = require( '@stdlib/random/kumaraswamy' );
@@ -56,6 +58,7 @@ import streams = require( '@stdlib/random/streams' );
5658
import strided = require( '@stdlib/random/strided' );
5759
import t = require( '@stdlib/random/t' );
5860
import tools = require( '@stdlib/random/tools' );
61+
import triangular = require( '@stdlib/random/triangular' );
5962
import uniform = require( '@stdlib/random/uniform' );
6063
import weibull = require( '@stdlib/random/weibull' );
6164

@@ -511,6 +514,41 @@ interface Namespace {
511514
*/
512515
f: typeof f;
513516

517+
/**
518+
* Generates pseudorandom numbers drawn from a Fréchet distribution.
519+
*
520+
* @param shape - output shape
521+
* @param alpha - shape parameter
522+
* @param s - scale parameter
523+
* @param m - location parameter
524+
* @param options - function options
525+
* @throws distribution parameters and the output shape must be broadcast compatible
526+
* @returns output ndarray
527+
*
528+
* @example
529+
* var out = ns.frechet( [ 3, 3 ], 2.0, 5.0, 3.0 );
530+
* // returns <ndarray>
531+
*
532+
* @example
533+
* var zeros = require( '@stdlib/ndarray/zeros' );
534+
*
535+
* var out = zeros( [ 3, 3 ] );
536+
* // returns <ndarray>
537+
*
538+
* var v = ns.frechet.assign( 2.0, 5.0, 3.0, out );
539+
* // returns <ndarray>
540+
*
541+
* var bool = ( v === out );
542+
* // returns true
543+
*
544+
* @example
545+
* var random = ns.frechet.factory();
546+
*
547+
* var out = random( [ 3, 3 ], 2.0, 5.0, 3.0 );
548+
* // returns <ndarray>
549+
*/
550+
frechet: typeof frechet;
551+
514552
/**
515553
* Generates pseudorandom numbers drawn from a gamma distribution.
516554
*
@@ -612,6 +650,41 @@ interface Namespace {
612650
*/
613651
gumbel: typeof gumbel;
614652

653+
/**
654+
* Generates pseudorandom numbers drawn from a hypergeometric distribution.
655+
*
656+
* @param shape - output shape
657+
* @param N - population size
658+
* @param K - subpopulation size
659+
* @param n - number of draws
660+
* @param options - function options
661+
* @throws distribution parameters and the output shape must be broadcast compatible
662+
* @returns output ndarray
663+
*
664+
* @example
665+
* var out = ns.hypergeometric( [ 3, 3 ], 20, 10, 7 );
666+
* // returns <ndarray>
667+
*
668+
* @example
669+
* var zeros = require( '@stdlib/ndarray/zeros' );
670+
*
671+
* var out = zeros( [ 3, 3 ] );
672+
* // returns <ndarray>
673+
*
674+
* var v = ns.hypergeometric.assign( 20, 10, 7, out );
675+
* // returns <ndarray>
676+
*
677+
* var bool = ( v === out );
678+
* // returns true
679+
*
680+
* @example
681+
* var random = ns.hypergeometric.factory();
682+
*
683+
* var out = random( [ 3, 3 ], 20, 10, 7 );
684+
* // returns <ndarray>
685+
*/
686+
hypergeometric: typeof hypergeometric;
687+
615688
/**
616689
* Generates pseudorandom numbers drawn from an inverse gamma distribution.
617690
*
@@ -1079,6 +1152,41 @@ interface Namespace {
10791152
*/
10801153
tools: typeof tools;
10811154

1155+
/**
1156+
* Generates pseudorandom numbers drawn from a triangular distribution.
1157+
*
1158+
* @param shape - output shape
1159+
* @param a - minimum support
1160+
* @param b - maximum support
1161+
* @param c - mode
1162+
* @param options - function options
1163+
* @throws distribution parameters and the output shape must be broadcast compatible
1164+
* @returns output ndarray
1165+
*
1166+
* @example
1167+
* var out = ns.triangular( [ 3, 3 ], 2.0, 5.0, 3.0 );
1168+
* // returns <ndarray>
1169+
*
1170+
* @example
1171+
* var zeros = require( '@stdlib/ndarray/zeros' );
1172+
*
1173+
* var out = zeros( [ 3, 3 ] );
1174+
* // returns <ndarray>
1175+
*
1176+
* var v = ns.triangular.assign( 2.0, 5.0, 3.0, out );
1177+
* // returns <ndarray>
1178+
*
1179+
* var bool = ( v === out );
1180+
* // returns true
1181+
*
1182+
* @example
1183+
* var random = ns.triangular.factory();
1184+
*
1185+
* var out = random( [ 3, 3 ], 2.0, 5.0, 3.0 );
1186+
* // returns <ndarray>
1187+
*/
1188+
triangular: typeof triangular;
1189+
10821190
/**
10831191
* Generates pseudorandom numbers drawn from a continuous uniform distribution.
10841192
*

0 commit comments

Comments
 (0)