@stdlib/random-array 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2024 The Stdlib Authors.
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md CHANGED
@@ -102,6 +102,7 @@ The namespace contains the following:
102
102
  - <span class="signature">[`randu( len[, options] )`][@stdlib/random/array/randu]</span><span class="delimiter">: </span><span class="description">create an array containing uniformly distributed pseudorandom numbers between `0` and `1`.</span>
103
103
  - <span class="signature">[`rayleigh( len, sigma[, options] )`][@stdlib/random/array/rayleigh]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a Rayleigh distribution.</span>
104
104
  - <span class="signature">[`t( len, v[, options] )`][@stdlib/random/array/t]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a Student's t-distribution.</span>
105
+ - <span class="signature">[`tools`][@stdlib/random/array/tools]</span><span class="delimiter">: </span><span class="description">pseudorandom number generator (PRNG) array creation function tools.</span>
105
106
  - <span class="signature">[`triangular( len, a, b, c[, options] )`][@stdlib/random/array/triangular]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a triangular distribution.</span>
106
107
  - <span class="signature">[`uniform( len, a, b[, options] )`][@stdlib/random/array/uniform]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a continuous uniform distribution.</span>
107
108
  - <span class="signature">[`weibull( len, k, lambda[, options] )`][@stdlib/random/array/weibull]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a Weibull distribution.</span>
@@ -118,15 +119,46 @@ The namespace contains the following:
118
119
 
119
120
  ## Examples
120
121
 
121
- <!-- TODO: better examples -->
122
-
123
122
  <!-- eslint no-undef: "error" -->
124
123
 
125
124
  ```javascript
126
- var objectKeys = require( '@stdlib/utils-keys' );
127
125
  var ns = require( '@stdlib/random-array' );
128
126
 
129
- console.log( objectKeys( ns ) );
127
+ // Generate arrays with ten random numbers drawn from the respective distributions:
128
+ var out = ns.arcsine( 10, 2.0, 5.0 );
129
+ // returns <Float64Array>
130
+
131
+ out = ns.weibull( 10, 2.0, 5.0 );
132
+ // returns <Float64Array>
133
+
134
+ out = ns.laplace( 10, 2.0, 5.0 );
135
+ // returns <Float64Array>
136
+
137
+ // Factory methods:
138
+
139
+ // 1. Basic factory usage (no parameters):
140
+ var random = ns.arcsine.factory();
141
+ out = random( 10, 2.0, 5.0 );
142
+ // returns <Float64Array>
143
+
144
+ // 2. Factory with options (e.g., seed):
145
+ random = ns.arcsine.factory({
146
+ 'seed': 1234
147
+ });
148
+ out = random( 10, 2.0, 5.0 );
149
+ // returns <Float64Array>
150
+
151
+ // 3. Factory with distribution parameters:
152
+ random = ns.arcsine.factory( 2.0, 5.0 );
153
+ out = random( 10 );
154
+ // returns <Float64Array>
155
+
156
+ // 4. Factory with both distribution parameters and options:
157
+ random = ns.arcsine.factory( 2.0, 5.0, {
158
+ 'dtype': 'float32'
159
+ });
160
+ out = random( 10 );
161
+ // returns <Float32Array>
130
162
  ```
131
163
 
132
164
  </section>
@@ -167,7 +199,7 @@ See [LICENSE][stdlib-license].
167
199
 
168
200
  ## Copyright
169
201
 
170
- Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
202
+ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
171
203
 
172
204
  </section>
173
205
 
@@ -180,8 +212,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
180
212
  [npm-image]: http://img.shields.io/npm/v/@stdlib/random-array.svg
181
213
  [npm-url]: https://npmjs.org/package/@stdlib/random-array
182
214
 
183
- [test-image]: https://github.com/stdlib-js/random-array/actions/workflows/test.yml/badge.svg?branch=v0.2.1
184
- [test-url]: https://github.com/stdlib-js/random-array/actions/workflows/test.yml?query=branch:v0.2.1
215
+ [test-image]: https://github.com/stdlib-js/random-array/actions/workflows/test.yml/badge.svg?branch=v0.3.0
216
+ [test-url]: https://github.com/stdlib-js/random-array/actions/workflows/test.yml?query=branch:v0.3.0
185
217
 
186
218
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/random-array/main.svg
187
219
  [coverage-url]: https://codecov.io/github/stdlib-js/random-array?branch=main
@@ -193,8 +225,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
193
225
 
194
226
  -->
195
227
 
196
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
197
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
228
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
229
+ [chat-url]: https://stdlib.zulipchat.com
198
230
 
199
231
  [stdlib]: https://github.com/stdlib-js/stdlib
200
232
 
@@ -283,6 +315,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
283
315
 
284
316
  [@stdlib/random/array/t]: https://www.npmjs.com/package/@stdlib/random-array-t
285
317
 
318
+ [@stdlib/random/array/tools]: https://www.npmjs.com/package/@stdlib/random-array-tools
319
+
286
320
  [@stdlib/random/array/triangular]: https://www.npmjs.com/package/@stdlib/random-array-triangular
287
321
 
288
322
  [@stdlib/random/array/uniform]: https://www.npmjs.com/package/@stdlib/random-array-uniform
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"arcsine",require('@stdlib/random-array-arcsine/dist'));r(e,"bernoulli",require('@stdlib/random-array-bernoulli/dist'));r(e,"beta",require('@stdlib/random-array-beta/dist'));r(e,"betaprime",require('@stdlib/random-array-betaprime/dist'));r(e,"binomial",require('@stdlib/random-array-binomial/dist'));r(e,"cauchy",require('@stdlib/random-array-cauchy/dist'));r(e,"chi",require('@stdlib/random-array-chi/dist'));r(e,"chisquare",require('@stdlib/random-array-chisquare/dist'));r(e,"cosine",require('@stdlib/random-array-cosine/dist'));r(e,"discreteUniform",require('@stdlib/random-array-discrete-uniform/dist'));r(e,"erlang",require('@stdlib/random-array-erlang/dist'));r(e,"exponential",require('@stdlib/random-array-exponential/dist'));r(e,"f",require('@stdlib/random-array-f/dist'));r(e,"frechet",require('@stdlib/random-array-frechet/dist'));r(e,"gamma",require('@stdlib/random-array-gamma/dist'));r(e,"geometric",require('@stdlib/random-array-geometric/dist'));r(e,"gumbel",require('@stdlib/random-array-gumbel/dist'));r(e,"hypergeometric",require('@stdlib/random-array-hypergeometric/dist'));r(e,"invgamma",require('@stdlib/random-array-invgamma/dist'));r(e,"kumaraswamy",require('@stdlib/random-array-kumaraswamy/dist'));r(e,"laplace",require('@stdlib/random-array-laplace/dist'));r(e,"levy",require('@stdlib/random-array-levy/dist'));r(e,"logistic",require('@stdlib/random-array-logistic/dist'));r(e,"lognormal",require('@stdlib/random-array-lognormal/dist'));r(e,"minstd",require('@stdlib/random-array-minstd/dist'));r(e,"minstdShuffle",require('@stdlib/random-array-minstd-shuffle/dist'));r(e,"mt19937",require('@stdlib/random-array-mt19937/dist'));r(e,"negativeBinomial",require('@stdlib/random-array-negative-binomial/dist'));r(e,"normal",require('@stdlib/random-array-normal/dist'));r(e,"pareto1",require('@stdlib/random-array-pareto-type1/dist'));r(e,"poisson",require('@stdlib/random-array-poisson/dist'));r(e,"randu",require('@stdlib/random-array-randu/dist'));r(e,"rayleigh",require('@stdlib/random-array-rayleigh/dist'));r(e,"t",require('@stdlib/random-array-t/dist'));r(e,"triangular",require('@stdlib/random-array-triangular/dist'));r(e,"uniform",require('@stdlib/random-array-uniform/dist'));r(e,"weibull",require('@stdlib/random-array-weibull/dist'));module.exports=e;
1
+ "use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"arcsine",require('@stdlib/random-array-arcsine/dist'));r(e,"bernoulli",require('@stdlib/random-array-bernoulli/dist'));r(e,"beta",require('@stdlib/random-array-beta/dist'));r(e,"betaprime",require('@stdlib/random-array-betaprime/dist'));r(e,"binomial",require('@stdlib/random-array-binomial/dist'));r(e,"cauchy",require('@stdlib/random-array-cauchy/dist'));r(e,"chi",require('@stdlib/random-array-chi/dist'));r(e,"chisquare",require('@stdlib/random-array-chisquare/dist'));r(e,"cosine",require('@stdlib/random-array-cosine/dist'));r(e,"discreteUniform",require('@stdlib/random-array-discrete-uniform/dist'));r(e,"erlang",require('@stdlib/random-array-erlang/dist'));r(e,"exponential",require('@stdlib/random-array-exponential/dist'));r(e,"f",require('@stdlib/random-array-f/dist'));r(e,"frechet",require('@stdlib/random-array-frechet/dist'));r(e,"gamma",require('@stdlib/random-array-gamma/dist'));r(e,"geometric",require('@stdlib/random-array-geometric/dist'));r(e,"gumbel",require('@stdlib/random-array-gumbel/dist'));r(e,"hypergeometric",require('@stdlib/random-array-hypergeometric/dist'));r(e,"invgamma",require('@stdlib/random-array-invgamma/dist'));r(e,"kumaraswamy",require('@stdlib/random-array-kumaraswamy/dist'));r(e,"laplace",require('@stdlib/random-array-laplace/dist'));r(e,"levy",require('@stdlib/random-array-levy/dist'));r(e,"logistic",require('@stdlib/random-array-logistic/dist'));r(e,"lognormal",require('@stdlib/random-array-lognormal/dist'));r(e,"minstd",require('@stdlib/random-array-minstd/dist'));r(e,"minstdShuffle",require('@stdlib/random-array-minstd-shuffle/dist'));r(e,"mt19937",require('@stdlib/random-array-mt19937/dist'));r(e,"negativeBinomial",require('@stdlib/random-array-negative-binomial/dist'));r(e,"normal",require('@stdlib/random-array-normal/dist'));r(e,"pareto1",require('@stdlib/random-array-pareto-type1/dist'));r(e,"poisson",require('@stdlib/random-array-poisson/dist'));r(e,"randu",require('@stdlib/random-array-randu/dist'));r(e,"rayleigh",require('@stdlib/random-array-rayleigh/dist'));r(e,"t",require('@stdlib/random-array-t/dist'));r(e,"tools",require('@stdlib/random-array-tools/dist'));r(e,"triangular",require('@stdlib/random-array-triangular/dist'));r(e,"uniform",require('@stdlib/random-array-uniform/dist'));r(e,"weibull",require('@stdlib/random-array-weibull/dist'));module.exports=e;
2
2
  /** @license Apache-2.0 */
3
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/index.js"],
4
- "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name arcsine\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/arcsine}\n*/\nsetReadOnly( ns, 'arcsine', require( '@stdlib/random-array-arcsine' ) );\n\n/**\n* @name bernoulli\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/bernoulli}\n*/\nsetReadOnly( ns, 'bernoulli', require( '@stdlib/random-array-bernoulli' ) );\n\n/**\n* @name beta\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/beta}\n*/\nsetReadOnly( ns, 'beta', require( '@stdlib/random-array-beta' ) );\n\n/**\n* @name betaprime\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/betaprime}\n*/\nsetReadOnly( ns, 'betaprime', require( '@stdlib/random-array-betaprime' ) );\n\n/**\n* @name binomial\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/binomial}\n*/\nsetReadOnly( ns, 'binomial', require( '@stdlib/random-array-binomial' ) );\n\n/**\n* @name cauchy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/cauchy}\n*/\nsetReadOnly( ns, 'cauchy', require( '@stdlib/random-array-cauchy' ) );\n\n/**\n* @name chi\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/chi}\n*/\nsetReadOnly( ns, 'chi', require( '@stdlib/random-array-chi' ) );\n\n/**\n* @name chisquare\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/chisquare}\n*/\nsetReadOnly( ns, 'chisquare', require( '@stdlib/random-array-chisquare' ) );\n\n/**\n* @name cosine\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/cosine}\n*/\nsetReadOnly( ns, 'cosine', require( '@stdlib/random-array-cosine' ) );\n\n/**\n* @name discreteUniform\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/discrete-uniform}\n*/\nsetReadOnly( ns, 'discreteUniform', require( '@stdlib/random-array-discrete-uniform' ) );\n\n/**\n* @name erlang\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/erlang}\n*/\nsetReadOnly( ns, 'erlang', require( '@stdlib/random-array-erlang' ) );\n\n/**\n* @name exponential\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/exponential}\n*/\nsetReadOnly( ns, 'exponential', require( '@stdlib/random-array-exponential' ) );\n\n/**\n* @name f\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/f}\n*/\nsetReadOnly( ns, 'f', require( '@stdlib/random-array-f' ) );\n\n/**\n* @name frechet\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/frechet}\n*/\nsetReadOnly( ns, 'frechet', require( '@stdlib/random-array-frechet' ) );\n\n/**\n* @name gamma\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/gamma}\n*/\nsetReadOnly( ns, 'gamma', require( '@stdlib/random-array-gamma' ) );\n\n/**\n* @name geometric\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/geometric}\n*/\nsetReadOnly( ns, 'geometric', require( '@stdlib/random-array-geometric' ) );\n\n/**\n* @name gumbel\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/gumbel}\n*/\nsetReadOnly( ns, 'gumbel', require( '@stdlib/random-array-gumbel' ) );\n\n/**\n* @name hypergeometric\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/hypergeometric}\n*/\nsetReadOnly( ns, 'hypergeometric', require( '@stdlib/random-array-hypergeometric' ) );\n\n/**\n* @name invgamma\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/invgamma}\n*/\nsetReadOnly( ns, 'invgamma', require( '@stdlib/random-array-invgamma' ) );\n\n/**\n* @name kumaraswamy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/kumaraswamy}\n*/\nsetReadOnly( ns, 'kumaraswamy', require( '@stdlib/random-array-kumaraswamy' ) );\n\n/**\n* @name laplace\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/laplace}\n*/\nsetReadOnly( ns, 'laplace', require( '@stdlib/random-array-laplace' ) );\n\n/**\n* @name levy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/levy}\n*/\nsetReadOnly( ns, 'levy', require( '@stdlib/random-array-levy' ) );\n\n/**\n* @name logistic\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/logistic}\n*/\nsetReadOnly( ns, 'logistic', require( '@stdlib/random-array-logistic' ) );\n\n/**\n* @name lognormal\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/lognormal}\n*/\nsetReadOnly( ns, 'lognormal', require( '@stdlib/random-array-lognormal' ) );\n\n/**\n* @name minstd\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/minstd}\n*/\nsetReadOnly( ns, 'minstd', require( '@stdlib/random-array-minstd' ) );\n\n/**\n* @name minstdShuffle\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/minstd-shuffle}\n*/\nsetReadOnly( ns, 'minstdShuffle', require( '@stdlib/random-array-minstd-shuffle' ) );\n\n/**\n* @name mt19937\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/mt19937}\n*/\nsetReadOnly( ns, 'mt19937', require( '@stdlib/random-array-mt19937' ) );\n\n/**\n* @name negativeBinomial\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/negative-binomial}\n*/\nsetReadOnly( ns, 'negativeBinomial', require( '@stdlib/random-array-negative-binomial' ) );\n\n/**\n* @name normal\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/normal}\n*/\nsetReadOnly( ns, 'normal', require( '@stdlib/random-array-normal' ) );\n\n/**\n* @name pareto1\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/pareto-type1}\n*/\nsetReadOnly( ns, 'pareto1', require( '@stdlib/random-array-pareto-type1' ) );\n\n/**\n* @name poisson\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/poisson}\n*/\nsetReadOnly( ns, 'poisson', require( '@stdlib/random-array-poisson' ) );\n\n/**\n* @name randu\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/randu}\n*/\nsetReadOnly( ns, 'randu', require( '@stdlib/random-array-randu' ) );\n\n/**\n* @name rayleigh\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/rayleigh}\n*/\nsetReadOnly( ns, 'rayleigh', require( '@stdlib/random-array-rayleigh' ) );\n\n/**\n* @name t\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/t}\n*/\nsetReadOnly( ns, 't', require( '@stdlib/random-array-t' ) );\n\n/**\n* @name triangular\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/triangular}\n*/\nsetReadOnly( ns, 'triangular', require( '@stdlib/random-array-triangular' ) );\n\n/**\n* @name uniform\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/uniform}\n*/\nsetReadOnly( ns, 'uniform', require( '@stdlib/random-array-uniform' ) );\n\n/**\n* @name weibull\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/weibull}\n*/\nsetReadOnly( ns, 'weibull', require( '@stdlib/random-array-weibull' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"],
5
- "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,UAAW,QAAS,8BAA+B,CAAE,EAStED,EAAaC,EAAI,YAAa,QAAS,gCAAiC,CAAE,EAS1ED,EAAaC,EAAI,OAAQ,QAAS,2BAA4B,CAAE,EAShED,EAAaC,EAAI,YAAa,QAAS,gCAAiC,CAAE,EAS1ED,EAAaC,EAAI,WAAY,QAAS,+BAAgC,CAAE,EASxED,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,MAAO,QAAS,0BAA2B,CAAE,EAS9DD,EAAaC,EAAI,YAAa,QAAS,gCAAiC,CAAE,EAS1ED,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,kBAAmB,QAAS,uCAAwC,CAAE,EASvFD,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAA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) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name arcsine\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/arcsine}\n*/\nsetReadOnly( ns, 'arcsine', require( '@stdlib/random-array-arcsine' ) );\n\n/**\n* @name bernoulli\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/bernoulli}\n*/\nsetReadOnly( ns, 'bernoulli', require( '@stdlib/random-array-bernoulli' ) );\n\n/**\n* @name beta\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/beta}\n*/\nsetReadOnly( ns, 'beta', require( '@stdlib/random-array-beta' ) );\n\n/**\n* @name betaprime\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/betaprime}\n*/\nsetReadOnly( ns, 'betaprime', require( '@stdlib/random-array-betaprime' ) );\n\n/**\n* @name binomial\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/binomial}\n*/\nsetReadOnly( ns, 'binomial', require( '@stdlib/random-array-binomial' ) );\n\n/**\n* @name cauchy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/cauchy}\n*/\nsetReadOnly( ns, 'cauchy', require( '@stdlib/random-array-cauchy' ) );\n\n/**\n* @name chi\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/chi}\n*/\nsetReadOnly( ns, 'chi', require( '@stdlib/random-array-chi' ) );\n\n/**\n* @name chisquare\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/chisquare}\n*/\nsetReadOnly( ns, 'chisquare', require( '@stdlib/random-array-chisquare' ) );\n\n/**\n* @name cosine\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/cosine}\n*/\nsetReadOnly( ns, 'cosine', require( '@stdlib/random-array-cosine' ) );\n\n/**\n* @name discreteUniform\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/discrete-uniform}\n*/\nsetReadOnly( ns, 'discreteUniform', require( '@stdlib/random-array-discrete-uniform' ) );\n\n/**\n* @name erlang\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/erlang}\n*/\nsetReadOnly( ns, 'erlang', require( '@stdlib/random-array-erlang' ) );\n\n/**\n* @name exponential\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/exponential}\n*/\nsetReadOnly( ns, 'exponential', require( '@stdlib/random-array-exponential' ) );\n\n/**\n* @name f\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/f}\n*/\nsetReadOnly( ns, 'f', require( '@stdlib/random-array-f' ) );\n\n/**\n* @name frechet\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/frechet}\n*/\nsetReadOnly( ns, 'frechet', require( '@stdlib/random-array-frechet' ) );\n\n/**\n* @name gamma\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/gamma}\n*/\nsetReadOnly( ns, 'gamma', require( '@stdlib/random-array-gamma' ) );\n\n/**\n* @name geometric\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/geometric}\n*/\nsetReadOnly( ns, 'geometric', require( '@stdlib/random-array-geometric' ) );\n\n/**\n* @name gumbel\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/gumbel}\n*/\nsetReadOnly( ns, 'gumbel', require( '@stdlib/random-array-gumbel' ) );\n\n/**\n* @name hypergeometric\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/hypergeometric}\n*/\nsetReadOnly( ns, 'hypergeometric', require( '@stdlib/random-array-hypergeometric' ) );\n\n/**\n* @name invgamma\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/invgamma}\n*/\nsetReadOnly( ns, 'invgamma', require( '@stdlib/random-array-invgamma' ) );\n\n/**\n* @name kumaraswamy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/kumaraswamy}\n*/\nsetReadOnly( ns, 'kumaraswamy', require( '@stdlib/random-array-kumaraswamy' ) );\n\n/**\n* @name laplace\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/laplace}\n*/\nsetReadOnly( ns, 'laplace', require( '@stdlib/random-array-laplace' ) );\n\n/**\n* @name levy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/levy}\n*/\nsetReadOnly( ns, 'levy', require( '@stdlib/random-array-levy' ) );\n\n/**\n* @name logistic\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/logistic}\n*/\nsetReadOnly( ns, 'logistic', require( '@stdlib/random-array-logistic' ) );\n\n/**\n* @name lognormal\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/lognormal}\n*/\nsetReadOnly( ns, 'lognormal', require( '@stdlib/random-array-lognormal' ) );\n\n/**\n* @name minstd\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/minstd}\n*/\nsetReadOnly( ns, 'minstd', require( '@stdlib/random-array-minstd' ) );\n\n/**\n* @name minstdShuffle\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/minstd-shuffle}\n*/\nsetReadOnly( ns, 'minstdShuffle', require( '@stdlib/random-array-minstd-shuffle' ) );\n\n/**\n* @name mt19937\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/mt19937}\n*/\nsetReadOnly( ns, 'mt19937', require( '@stdlib/random-array-mt19937' ) );\n\n/**\n* @name negativeBinomial\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/negative-binomial}\n*/\nsetReadOnly( ns, 'negativeBinomial', require( '@stdlib/random-array-negative-binomial' ) );\n\n/**\n* @name normal\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/normal}\n*/\nsetReadOnly( ns, 'normal', require( '@stdlib/random-array-normal' ) );\n\n/**\n* @name pareto1\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/pareto-type1}\n*/\nsetReadOnly( ns, 'pareto1', require( '@stdlib/random-array-pareto-type1' ) );\n\n/**\n* @name poisson\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/poisson}\n*/\nsetReadOnly( ns, 'poisson', require( '@stdlib/random-array-poisson' ) );\n\n/**\n* @name randu\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/randu}\n*/\nsetReadOnly( ns, 'randu', require( '@stdlib/random-array-randu' ) );\n\n/**\n* @name rayleigh\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/rayleigh}\n*/\nsetReadOnly( ns, 'rayleigh', require( '@stdlib/random-array-rayleigh' ) );\n\n/**\n* @name t\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/t}\n*/\nsetReadOnly( ns, 't', require( '@stdlib/random-array-t' ) );\n\n/**\n* @name tools\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/random/array/tools}\n*/\nsetReadOnly( ns, 'tools', require( '@stdlib/random-array-tools' ) );\n\n/**\n* @name triangular\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/triangular}\n*/\nsetReadOnly( ns, 'triangular', require( '@stdlib/random-array-triangular' ) );\n\n/**\n* @name uniform\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/uniform}\n*/\nsetReadOnly( ns, 'uniform', require( '@stdlib/random-array-uniform' ) );\n\n/**\n* @name weibull\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/random/array/weibull}\n*/\nsetReadOnly( ns, 'weibull', require( '@stdlib/random-array-weibull' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"],
5
+ "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,UAAW,QAAS,8BAA+B,CAAE,EAStED,EAAaC,EAAI,YAAa,QAAS,gCAAiC,CAAE,EAS1ED,EAAaC,EAAI,OAAQ,QAAS,2BAA4B,CAAE,EAShED,EAAaC,EAAI,YAAa,QAAS,gCAAiC,CAAE,EAS1ED,EAAaC,EAAI,WAAY,QAAS,+BAAgC,CAAE,EASxED,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,MAAO,QAAS,0BAA2B,CAAE,EAS9DD,EAAaC,EAAI,YAAa,QAAS,gCAAiC,CAAE,EAS1ED,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,kBAAmB,QAAS,uCAAwC,CAAE,EASvFD,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,IAAK,QAAS,wBAAyB,CAAE,EAS1DD,EAAaC,EAAI,UAAW,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stdlib/random-array-poisson' );
54
54
  import randu = require( '@stdlib/random-array-randu' );
55
55
  import rayleigh = require( '@stdlib/random-array-rayleigh' );
56
56
  import t = require( '@stdlib/random-array-t' );
57
+ import tools = require( '@stdlib/random-array-tools' );
57
58
  import triangular = require( '@stdlib/random-array-triangular' );
58
59
  import uniform = require( '@stdlib/random-array-uniform' );
59
60
  import weibull = require( '@stdlib/random-array-weibull' );
@@ -324,7 +325,7 @@ interface Namespace {
324
325
  * // returns <Float64Array>
325
326
  *
326
327
  * @example
327
- * var random = ns.f.ns.factory( 2.0, 5.0 );
328
+ * var random = ns.f.factory( 2.0, 5.0 );
328
329
  *
329
330
  * var out = random( 10 );
330
331
  * // returns <Float64Array>
@@ -774,6 +775,11 @@ interface Namespace {
774
775
  */
775
776
  t: typeof t;
776
777
 
778
+ /**
779
+ * Pseudorandom number generator array creation function tools.
780
+ */
781
+ tools: typeof tools;
782
+
777
783
  /**
778
784
  * Returns an array containing pseudorandom numbers drawn from a triangular distribution.
779
785
  *
@@ -821,8 +827,8 @@ interface Namespace {
821
827
  * Returns an array containing pseudorandom numbers drawn from a Weibull distribution.
822
828
  *
823
829
  * @param len - array length
824
- * @param k - scale parameter
825
- * @param lambda - shape parameter
830
+ * @param k - shape parameter
831
+ * @param lambda - scale parameter
826
832
  * @param options - function options
827
833
  * @returns output array
828
834
  *
package/lib/index.js CHANGED
@@ -342,6 +342,15 @@ setReadOnly( ns, 'rayleigh', require( '@stdlib/random-array-rayleigh' ) );
342
342
  */
343
343
  setReadOnly( ns, 't', require( '@stdlib/random-array-t' ) );
344
344
 
345
+ /**
346
+ * @name tools
347
+ * @memberof ns
348
+ * @readonly
349
+ * @type {Namespace}
350
+ * @see {@link module:@stdlib/random/array/tools}
351
+ */
352
+ setReadOnly( ns, 'tools', require( '@stdlib/random-array-tools' ) );
353
+
345
354
  /**
346
355
  * @name triangular
347
356
  * @memberof ns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/random-array",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Pseudorandom number generator array creation functions.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -17,6 +17,7 @@
17
17
  "directories": {
18
18
  "doc": "./docs",
19
19
  "lib": "./lib",
20
+ "scripts": "./scripts",
20
21
  "dist": "./dist"
21
22
  },
22
23
  "types": "./docs/types",
@@ -64,10 +65,11 @@
64
65
  "@stdlib/random-array-randu": "^0.2.1",
65
66
  "@stdlib/random-array-rayleigh": "^0.2.1",
66
67
  "@stdlib/random-array-t": "^0.2.1",
68
+ "@stdlib/random-array-tools": "^0.3.0",
67
69
  "@stdlib/random-array-triangular": "^0.2.1",
68
70
  "@stdlib/random-array-uniform": "^0.2.1",
69
71
  "@stdlib/random-array-weibull": "^0.2.1",
70
- "@stdlib/utils-define-read-only-property": "^0.2.1"
72
+ "@stdlib/utils-define-read-only-property": "^0.2.2"
71
73
  },
72
74
  "devDependencies": {},
73
75
  "engines": {