@stdlib/random-array 0.1.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/CITATION.cff ADDED
@@ -0,0 +1,30 @@
1
+ cff-version: 1.2.0
2
+ title: stdlib
3
+ message: >-
4
+ If you use this software, please cite it using the
5
+ metadata from this file.
6
+
7
+ type: software
8
+
9
+ authors:
10
+ - name: The Stdlib Authors
11
+ url: https://github.com/stdlib-js/stdlib/graphs/contributors
12
+
13
+ repository-code: https://github.com/stdlib-js/stdlib
14
+ url: https://stdlib.io
15
+
16
+ abstract: |
17
+ Standard library for JavaScript and Node.js.
18
+
19
+ keywords:
20
+ - JavaScript
21
+ - Node.js
22
+ - TypeScript
23
+ - standard library
24
+ - scientific computing
25
+ - numerical computing
26
+ - statistical computing
27
+
28
+ license: Apache-2.0 AND BSL-1.0
29
+
30
+ date-released: 2016
package/LICENSE ADDED
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
package/NOTICE ADDED
@@ -0,0 +1 @@
1
+ Copyright (c) 2016-2023 The Stdlib Authors.
package/README.md ADDED
@@ -0,0 +1,227 @@
1
+ <!--
2
+
3
+ @license Apache-2.0
4
+
5
+ Copyright (c) 2023 The Stdlib Authors.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ -->
20
+
21
+
22
+ <details>
23
+ <summary>
24
+ About stdlib...
25
+ </summary>
26
+ <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
27
+ <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
28
+ <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
29
+ <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
30
+ </details>
31
+
32
+ # Array
33
+
34
+ [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
35
+
36
+ > Pseudorandom number generator (PRNG) array creation functions.
37
+
38
+ <section class="installation">
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ npm install @stdlib/random-array
44
+ ```
45
+
46
+ </section>
47
+
48
+ <section class="usage">
49
+
50
+ ## Usage
51
+
52
+ ```javascript
53
+ var ns = require( '@stdlib/random-array' );
54
+ ```
55
+
56
+ #### ns
57
+
58
+ Namespace containing array creation pseudorandom number generator (PRNG) functions.
59
+
60
+ ```javascript
61
+ var o = ns;
62
+ // returns {...}
63
+ ```
64
+
65
+ The namespace contains the following:
66
+
67
+ <!-- <toc pattern="*"> -->
68
+
69
+ <div class="namespace-toc">
70
+
71
+ - <span class="signature">[`arcsine( len, a, b[, options] )`][@stdlib/random/array/arcsine]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from an arcsine distribution.</span>
72
+ - <span class="signature">[`beta( len, alpha, beta[, options] )`][@stdlib/random/array/beta]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a beta distribution.</span>
73
+ - <span class="signature">[`betaprime( len, alpha, beta[, options] )`][@stdlib/random/array/betaprime]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a beta prime distribution.</span>
74
+ - <span class="signature">[`cosine( len, mu, s[, options] )`][@stdlib/random/array/cosine]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a raised cosine distribution.</span>
75
+ - <span class="signature">[`discreteUniform( len, a, b[, options] )`][@stdlib/random/array/discrete-uniform]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a discrete uniform distribution.</span>
76
+ - <span class="signature">[`exponential( len, lambda[, options] )`][@stdlib/random/array/exponential]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from an exponential distribution.</span>
77
+ - <span class="signature">[`gamma( len, alpha, beta[, options] )`][@stdlib/random/array/gamma]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a gamma distribution.</span>
78
+ - <span class="signature">[`invgamma( len, alpha, beta[, options] )`][@stdlib/random/array/invgamma]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from an inverse gamma distribution.</span>
79
+ - <span class="signature">[`lognormal( len, mu, sigma[, options] )`][@stdlib/random/array/lognormal]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a lognormal distribution.</span>
80
+ - <span class="signature">[`minstdShuffle( len[, options] )`][@stdlib/random/array/minstd-shuffle]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers generated using a linear congruential pseudorandom number generator (LCG) whose output is shuffled.</span>
81
+ - <span class="signature">[`minstd( len[, options] )`][@stdlib/random/array/minstd]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers generated using a linear congruential pseudorandom number generator (LCG).</span>
82
+ - <span class="signature">[`mt19937( len[, options] )`][@stdlib/random/array/mt19937]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers generated using a 32-bit Mersenne Twister pseudorandom number generator.</span>
83
+ - <span class="signature">[`normal( len, mu, sigma[, options] )`][@stdlib/random/array/normal]</span><span class="delimiter">: </span><span class="description">create an array containing pseudorandom numbers drawn from a normal distribution.</span>
84
+ - <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>
85
+ - <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>
86
+
87
+ </div>
88
+
89
+ <!-- </toc> -->
90
+
91
+ </section>
92
+
93
+ <!-- /.usage -->
94
+
95
+ <section class="examples">
96
+
97
+ ## Examples
98
+
99
+ <!-- TODO: better examples -->
100
+
101
+ <!-- eslint no-undef: "error" -->
102
+
103
+ ```javascript
104
+ var objectKeys = require( '@stdlib/utils-keys' );
105
+ var ns = require( '@stdlib/random-array' );
106
+
107
+ console.log( objectKeys( ns ) );
108
+ ```
109
+
110
+ </section>
111
+
112
+ <!-- /.examples -->
113
+
114
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
115
+
116
+ <section class="related">
117
+
118
+ </section>
119
+
120
+ <!-- /.related -->
121
+
122
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
123
+
124
+
125
+ <section class="main-repo" >
126
+
127
+ * * *
128
+
129
+ ## Notice
130
+
131
+ This package is part of [stdlib][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.
132
+
133
+ For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].
134
+
135
+ #### Community
136
+
137
+ [![Chat][chat-image]][chat-url]
138
+
139
+ ---
140
+
141
+ ## License
142
+
143
+ See [LICENSE][stdlib-license].
144
+
145
+
146
+ ## Copyright
147
+
148
+ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
149
+
150
+ </section>
151
+
152
+ <!-- /.stdlib -->
153
+
154
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
155
+
156
+ <section class="links">
157
+
158
+ [npm-image]: http://img.shields.io/npm/v/@stdlib/random-array.svg
159
+ [npm-url]: https://npmjs.org/package/@stdlib/random-array
160
+
161
+ [test-image]: https://github.com/stdlib-js/random-array/actions/workflows/test.yml/badge.svg?branch=v0.1.0
162
+ [test-url]: https://github.com/stdlib-js/random-array/actions/workflows/test.yml?query=branch:v0.1.0
163
+
164
+ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/random-array/main.svg
165
+ [coverage-url]: https://codecov.io/github/stdlib-js/random-array?branch=main
166
+
167
+ <!--
168
+
169
+ [dependencies-image]: https://img.shields.io/david/stdlib-js/random-array.svg
170
+ [dependencies-url]: https://david-dm.org/stdlib-js/random-array/main
171
+
172
+ -->
173
+
174
+ [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
175
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
176
+
177
+ [stdlib]: https://github.com/stdlib-js/stdlib
178
+
179
+ [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
180
+
181
+ [umd]: https://github.com/umdjs/umd
182
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
183
+
184
+ [deno-url]: https://github.com/stdlib-js/random-array/tree/deno
185
+ [umd-url]: https://github.com/stdlib-js/random-array/tree/umd
186
+ [esm-url]: https://github.com/stdlib-js/random-array/tree/esm
187
+ [branches-url]: https://github.com/stdlib-js/random-array/blob/main/branches.md
188
+
189
+ [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/random-array/main/LICENSE
190
+
191
+ <!-- <toc-links> -->
192
+
193
+ [@stdlib/random/array/arcsine]: https://www.npmjs.com/package/@stdlib/random-array-arcsine
194
+
195
+ [@stdlib/random/array/beta]: https://www.npmjs.com/package/@stdlib/random-array-beta
196
+
197
+ [@stdlib/random/array/betaprime]: https://www.npmjs.com/package/@stdlib/random-array-betaprime
198
+
199
+ [@stdlib/random/array/cosine]: https://www.npmjs.com/package/@stdlib/random-array-cosine
200
+
201
+ [@stdlib/random/array/discrete-uniform]: https://www.npmjs.com/package/@stdlib/random-array-discrete-uniform
202
+
203
+ [@stdlib/random/array/exponential]: https://www.npmjs.com/package/@stdlib/random-array-exponential
204
+
205
+ [@stdlib/random/array/gamma]: https://www.npmjs.com/package/@stdlib/random-array-gamma
206
+
207
+ [@stdlib/random/array/invgamma]: https://www.npmjs.com/package/@stdlib/random-array-invgamma
208
+
209
+ [@stdlib/random/array/lognormal]: https://www.npmjs.com/package/@stdlib/random-array-lognormal
210
+
211
+ [@stdlib/random/array/minstd-shuffle]: https://www.npmjs.com/package/@stdlib/random-array-minstd-shuffle
212
+
213
+ [@stdlib/random/array/minstd]: https://www.npmjs.com/package/@stdlib/random-array-minstd
214
+
215
+ [@stdlib/random/array/mt19937]: https://www.npmjs.com/package/@stdlib/random-array-mt19937
216
+
217
+ [@stdlib/random/array/normal]: https://www.npmjs.com/package/@stdlib/random-array-normal
218
+
219
+ [@stdlib/random/array/randu]: https://www.npmjs.com/package/@stdlib/random-array-randu
220
+
221
+ [@stdlib/random/array/uniform]: https://www.npmjs.com/package/@stdlib/random-array-uniform
222
+
223
+ <!-- </toc-links> -->
224
+
225
+ </section>
226
+
227
+ <!-- /.links -->
@@ -0,0 +1,3 @@
1
+ /// <reference path="../docs/types/index.d.ts" />
2
+ import ns from '../docs/types/index';
3
+ export = ns;
package/dist/index.js ADDED
@@ -0,0 +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,"beta",require('@stdlib/random-array-beta/dist'));r(e,"betaprime",require('@stdlib/random-array-betaprime/dist'));r(e,"cosine",require('@stdlib/random-array-cosine/dist'));r(e,"discreteUniform",require('@stdlib/random-array-discrete-uniform/dist'));r(e,"exponential",require('@stdlib/random-array-exponential/dist'));r(e,"gamma",require('@stdlib/random-array-gamma/dist'));r(e,"invgamma",require('@stdlib/random-array-invgamma/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,"normal",require('@stdlib/random-array-normal/dist'));r(e,"randu",require('@stdlib/random-array-randu/dist'));r(e,"uniform",require('@stdlib/random-array-uniform/dist'));module.exports=e;
2
+ /** @license Apache-2.0 */
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 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 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 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 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 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 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 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 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 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// 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,OAAQ,QAAS,2BAA4B,CAAE,EAShED,EAAaC,EAAI,YAAa,QAAS,gCAAiC,CAAE,EAS1ED,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,kBAAmB,QAAS,uCAAwC,CAAE,EASvFD,EAAaC,EAAI,cAAe,QAAS,kCAAmC,CAAE,EAS9ED,EAAaC,EAAI,QAAS,QAAS,4BAA6B,CAAE,EASlED,EAAaC,EAAI,WAAY,QAAS,+BAAgC,CAAE,EASxED,EAAaC,EAAI,YAAa,QAAS,gCAAiC,CAAE,EAS1ED,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,gBAAiB,QAAS,qCAAsC,CAAE,EASnFD,EAAaC,EAAI,UAAW,QAAS,8BAA+B,CAAE,EAStED,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,QAAS,QAAS,4BAA6B,CAAE,EASlED,EAAaC,EAAI,UAAW,QAAS,8BAA+B,CAAE,EAKtE,OAAO,QAAUA",
6
+ "names": ["setReadOnly", "ns"]
7
+ }
@@ -0,0 +1,371 @@
1
+ /*
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2023 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ // TypeScript Version: 4.1
20
+
21
+ /* tslint:disable:max-line-length */
22
+ /* tslint:disable:max-file-line-count */
23
+
24
+ import arcsine = require( '@stdlib/random-array-arcsine' );
25
+ import beta = require( '@stdlib/random-array-beta' );
26
+ import betaprime = require( '@stdlib/random-array-betaprime' );
27
+ import cosine = require( '@stdlib/random-array-cosine' );
28
+ import discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
29
+ import exponential = require( '@stdlib/random-array-exponential' );
30
+ import gamma = require( '@stdlib/random-array-gamma' );
31
+ import invgamma = require( '@stdlib/random-array-invgamma' );
32
+ import lognormal = require( '@stdlib/random-array-lognormal' );
33
+ import minstd = require( '@stdlib/random-array-minstd' );
34
+ import minstdShuffle = require( '@stdlib/random-array-minstd-shuffle' );
35
+ import mt19937 = require( '@stdlib/random-array-mt19937' );
36
+ import normal = require( '@stdlib/random-array-normal' );
37
+ import randu = require( '@stdlib/random-array-randu' );
38
+ import uniform = require( '@stdlib/random-array-uniform' );
39
+
40
+ /**
41
+ * Interface describing the `array` namespace.
42
+ */
43
+ interface Namespace {
44
+ /**
45
+ * Returns an array containing pseudorandom numbers drawn from an arcsine distribution with minimum support `a` and maximum support `b`.
46
+ *
47
+ * @param len - array length
48
+ * @param a - minimum support
49
+ * @param b - maximum support
50
+ * @param options - function options
51
+ * @returns output array
52
+ *
53
+ * @example
54
+ * var out = ns.arcsine( 10, 2.0, 5.0 );
55
+ * // returns <Float64Array>
56
+ *
57
+ * @example
58
+ * var random = ns.arcsine.factory( 2.0, 5.0 );
59
+ *
60
+ * var out = random( 10 );
61
+ * // returns <Float64Array>
62
+ */
63
+ arcsine: typeof arcsine;
64
+
65
+ /**
66
+ * Returns an array containing pseudorandom numbers drawn from a beta distribution with parameters `alpha` (first shape parameter) and `beta` (second shape parameter).
67
+ *
68
+ * @param len - array length
69
+ * @param alpha - first shape parameter
70
+ * @param beta - second shape parameter
71
+ * @param options - function options
72
+ * @returns output array
73
+ *
74
+ * @example
75
+ * var out = ns.beta( 10, 2.0, 5.0 );
76
+ * // returns <Float64Array>
77
+ *
78
+ * @example
79
+ * var random = ns.beta.factory( 2.0, 5.0 );
80
+ *
81
+ * var out = random( 10 );
82
+ * // returns <Float64Array>
83
+ */
84
+ beta: typeof beta;
85
+
86
+ /**
87
+ * Returns an array containing pseudorandom numbers drawn from a beta prime distribution with parameters `alpha` (first shape parameter) and `beta` (second shape parameter).
88
+ *
89
+ * @param len - array length
90
+ * @param alpha - first shape parameter
91
+ * @param beta - second shape parameter
92
+ * @param options - function options
93
+ * @returns output array
94
+ *
95
+ * @example
96
+ * var out = ns.betaprime( 10, 2.0, 5.0 );
97
+ * // returns <Float64Array>
98
+ *
99
+ * @example
100
+ * var random = ns.betaprime.factory( 2.0, 5.0 );
101
+ *
102
+ * var out = random( 10 );
103
+ * // returns <Float64Array>
104
+ */
105
+ betaprime: typeof betaprime;
106
+
107
+ /**
108
+ * Returns an array containing pseudorandom numbers drawn from a raised cosine distribution with parameters `mu` (mean) and `s` (scale parameter).
109
+ *
110
+ * @param len - array length
111
+ * @param mu - mean
112
+ * @param s - scale parameter
113
+ * @param options - function options
114
+ * @returns output array
115
+ *
116
+ * @example
117
+ * var out = ns.cosine( 10, 2.0, 5.0 );
118
+ * // returns <Float64Array>
119
+ *
120
+ * @example
121
+ * var random = ns.cosine.factory( 2.0, 5.0 );
122
+ *
123
+ * var out = random( 10 );
124
+ * // returns <Float64Array>
125
+ */
126
+ cosine: typeof cosine;
127
+
128
+ /**
129
+ * Returns an array containing pseudorandom numbers drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.
130
+ *
131
+ * @param len - array length
132
+ * @param a - minimum support
133
+ * @param b - maximum support
134
+ * @param options - function options
135
+ * @returns output array
136
+ *
137
+ * @example
138
+ * var out = ns.discreteUniform( 10, -10, 10 );
139
+ * // returns <Float64Array>
140
+ *
141
+ * @example
142
+ * var random = ns.discreteUniform.factory( -10, 10 );
143
+ *
144
+ * var out = random( 10 );
145
+ * // returns <Float64Array>
146
+ */
147
+ discreteUniform: typeof discreteUniform;
148
+
149
+ /**
150
+ * Returns an array containing pseudorandom numbers drawn from an exponential distribution with rate parameter `lambda`.
151
+ *
152
+ * @param len - array length
153
+ * @param lambda - rate parameter
154
+ * @param options - function options
155
+ * @returns output array
156
+ *
157
+ * @example
158
+ * var out = ns.exponential( 10, 2.0 );
159
+ * // returns <Float64Array>
160
+ *
161
+ * @example
162
+ * var random = ns.exponential.factory( 2.0 );
163
+ *
164
+ * var out = random( 10 );
165
+ * // returns <Float64Array>
166
+ */
167
+ exponential: typeof exponential;
168
+
169
+ /**
170
+ * Returns an array containing pseudorandom numbers drawn from a gamma distribution with parameters `alpha` (shape parameter) and `beta` (rate parameter).
171
+ *
172
+ * @param len - array length
173
+ * @param alpha - shape parameter
174
+ * @param beta - rate parameter
175
+ * @param options - function options
176
+ * @returns output array
177
+ *
178
+ * @example
179
+ * var out = ns.gamma( 10, 2.0, 5.0 );
180
+ * // returns <Float64Array>
181
+ *
182
+ * @example
183
+ * var random = ns.gamma.factory( 2.0, 5.0 );
184
+ *
185
+ * var out = random( 10 );
186
+ * // returns <Float64Array>
187
+ */
188
+ gamma: typeof gamma;
189
+
190
+ /**
191
+ * Returns an array containing pseudorandom numbers drawn from an inverse gamma distribution with parameters `alpha` (shape parameter) and `beta` (scale parameter).
192
+ *
193
+ * @param len - array length
194
+ * @param alpha - shape parameter
195
+ * @param beta - scale parameter
196
+ * @param options - function options
197
+ * @returns output array
198
+ *
199
+ * @example
200
+ * var out = ns.invgamma( 10, 2.0, 5.0 );
201
+ * // returns <Float64Array>
202
+ *
203
+ * @example
204
+ * var random = ns.invgamma.factory( 2.0, 5.0 );
205
+ *
206
+ * var out = random( 10 );
207
+ * // returns <Float64Array>
208
+ */
209
+ invgamma: typeof invgamma;
210
+
211
+ /**
212
+ * Returns an array containing pseudorandom numbers drawn from a lognormal distribution with parameters `mu` (location parameter) and `sigma` (scale parameter).
213
+ *
214
+ * @param len - array length
215
+ * @param mu - location parameter
216
+ * @param sigma - scale parameter
217
+ * @param options - function options
218
+ * @returns output array
219
+ *
220
+ * @example
221
+ * var out = ns.lognormal( 10, 2.0, 5.0 );
222
+ * // returns <Float64Array>
223
+ *
224
+ * @example
225
+ * var random = ns.lognormal.factory( 2.0, 5.0 );
226
+ *
227
+ * var out = random( 10 );
228
+ * // returns <Float64Array>
229
+ */
230
+ lognormal: typeof lognormal;
231
+
232
+ /**
233
+ * Returns an array containing pseudorandom numbers using a linear congruential pseudorandom number generator (LCG).
234
+ *
235
+ * @param len - array length
236
+ * @param options - function options
237
+ * @returns output array
238
+ *
239
+ * @example
240
+ * var out = ns.minstd( 10 );
241
+ * // returns <Float64Array>
242
+ *
243
+ * @example
244
+ * var out = ns.minstd.normalized( 10 );
245
+ * // returns <Float64Array>
246
+ *
247
+ * @example
248
+ * var random = ns.minstd.factory();
249
+ *
250
+ * var out = random( 10 );
251
+ * // returns <Float64Array>
252
+ */
253
+ minstd: typeof minstd;
254
+
255
+ /**
256
+ * Returns an array containing pseudorandom numbers using a linear congruential pseudorandom number generator (LCG) whose output is shuffled.
257
+ *
258
+ * @param len - array length
259
+ * @param options - function options
260
+ * @returns output array
261
+ *
262
+ * @example
263
+ * var out = ns.minstdShuffle( 10 );
264
+ * // returns <Float64Array>
265
+ *
266
+ * @example
267
+ * var out = ns.minstdShuffle.normalized( 10 );
268
+ * // returns <Float64Array>
269
+ *
270
+ * @example
271
+ * var random = ns.minstdShuffle.factory();
272
+ *
273
+ * var out = random( 10 );
274
+ * // returns <Float64Array>
275
+ */
276
+ minstdShuffle: typeof minstdShuffle;
277
+
278
+ /**
279
+ * Returns an array containing pseudorandom numbers using a 32-bit Mersenne Twister pseudorandom number generator.
280
+ *
281
+ * @param len - array length
282
+ * @param options - function options
283
+ * @returns output array
284
+ *
285
+ * @example
286
+ * var out = ns.mt19937( 10 );
287
+ * // returns <Float64Array>
288
+ *
289
+ * @example
290
+ * var out = ns.mt19937.normalized( 10 );
291
+ * // returns <Float64Array>
292
+ *
293
+ * @example
294
+ * var random = ns.mt19937.factory();
295
+ *
296
+ * var out = random( 10 );
297
+ * // returns <Float64Array>
298
+ */
299
+ mt19937: typeof mt19937;
300
+
301
+ /**
302
+ * Returns an array containing pseudorandom numbers drawn from a normal distribution with parameters `mu` (mean) and `sigma` (standard deviation).
303
+ *
304
+ * @param len - array length
305
+ * @param mu - mean
306
+ * @param sigma - standard deviation
307
+ * @param options - function options
308
+ * @returns output array
309
+ *
310
+ * @example
311
+ * var out = ns.normal( 10, 2.0, 5.0 );
312
+ * // returns <Float64Array>
313
+ *
314
+ * @example
315
+ * var random = ns.normal.factory( 2.0, 5.0 );
316
+ *
317
+ * var out = random( 10 );
318
+ * // returns <Float64Array>
319
+ */
320
+ normal: typeof normal;
321
+
322
+ /**
323
+ * Returns an array containing uniformly distributed pseudorandom numbers between `0` and `1`.
324
+ *
325
+ * @param len - array length
326
+ * @param options - function options
327
+ * @returns output array
328
+ *
329
+ * @example
330
+ * var out = ns.randu( 10 );
331
+ * // returns <Float64Array>
332
+ *
333
+ * @example
334
+ * var random = ns.randu.factory();
335
+ *
336
+ * var out = random( 10 );
337
+ * // returns <Float64Array>
338
+ */
339
+ randu: typeof randu;
340
+
341
+ /**
342
+ * Returns an array containing pseudorandom numbers drawn from a continuous uniform distribution with minimum support `a` and maximum support `b`.
343
+ *
344
+ * @param len - array length
345
+ * @param a - minimum support
346
+ * @param b - maximum support
347
+ * @param options - function options
348
+ * @returns output array
349
+ *
350
+ * @example
351
+ * var out = ns.uniform( 10, 2.0, 5.0 );
352
+ * // returns <Float64Array>
353
+ *
354
+ * @example
355
+ * var random = ns.uniform.factory( 2.0, 5.0 );
356
+ *
357
+ * var out = random( 10 );
358
+ * // returns <Float64Array>
359
+ */
360
+ uniform: typeof uniform;
361
+ }
362
+
363
+ /**
364
+ * Pseudorandom number generator array creation functions.
365
+ */
366
+ declare var ns: Namespace;
367
+
368
+
369
+ // EXPORTS //
370
+
371
+ export = ns;
package/lib/index.js ADDED
@@ -0,0 +1,177 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2023 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ 'use strict';
20
+
21
+ /*
22
+ * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
23
+ */
24
+
25
+ // MODULES //
26
+
27
+ var setReadOnly = require( '@stdlib/utils-define-read-only-property' );
28
+
29
+
30
+ // MAIN //
31
+
32
+ /**
33
+ * Top-level namespace.
34
+ *
35
+ * @namespace ns
36
+ */
37
+ var ns = {};
38
+
39
+ /**
40
+ * @name arcsine
41
+ * @memberof ns
42
+ * @readonly
43
+ * @type {Function}
44
+ * @see {@link module:@stdlib/random/array/arcsine}
45
+ */
46
+ setReadOnly( ns, 'arcsine', require( '@stdlib/random-array-arcsine' ) );
47
+
48
+ /**
49
+ * @name beta
50
+ * @memberof ns
51
+ * @readonly
52
+ * @type {Function}
53
+ * @see {@link module:@stdlib/random/array/beta}
54
+ */
55
+ setReadOnly( ns, 'beta', require( '@stdlib/random-array-beta' ) );
56
+
57
+ /**
58
+ * @name betaprime
59
+ * @memberof ns
60
+ * @readonly
61
+ * @type {Function}
62
+ * @see {@link module:@stdlib/random/array/betaprime}
63
+ */
64
+ setReadOnly( ns, 'betaprime', require( '@stdlib/random-array-betaprime' ) );
65
+
66
+ /**
67
+ * @name cosine
68
+ * @memberof ns
69
+ * @readonly
70
+ * @type {Function}
71
+ * @see {@link module:@stdlib/random/array/cosine}
72
+ */
73
+ setReadOnly( ns, 'cosine', require( '@stdlib/random-array-cosine' ) );
74
+
75
+ /**
76
+ * @name discreteUniform
77
+ * @memberof ns
78
+ * @readonly
79
+ * @type {Function}
80
+ * @see {@link module:@stdlib/random/array/discrete-uniform}
81
+ */
82
+ setReadOnly( ns, 'discreteUniform', require( '@stdlib/random-array-discrete-uniform' ) );
83
+
84
+ /**
85
+ * @name exponential
86
+ * @memberof ns
87
+ * @readonly
88
+ * @type {Function}
89
+ * @see {@link module:@stdlib/random/array/exponential}
90
+ */
91
+ setReadOnly( ns, 'exponential', require( '@stdlib/random-array-exponential' ) );
92
+
93
+ /**
94
+ * @name gamma
95
+ * @memberof ns
96
+ * @readonly
97
+ * @type {Function}
98
+ * @see {@link module:@stdlib/random/array/gamma}
99
+ */
100
+ setReadOnly( ns, 'gamma', require( '@stdlib/random-array-gamma' ) );
101
+
102
+ /**
103
+ * @name invgamma
104
+ * @memberof ns
105
+ * @readonly
106
+ * @type {Function}
107
+ * @see {@link module:@stdlib/random/array/invgamma}
108
+ */
109
+ setReadOnly( ns, 'invgamma', require( '@stdlib/random-array-invgamma' ) );
110
+
111
+ /**
112
+ * @name lognormal
113
+ * @memberof ns
114
+ * @readonly
115
+ * @type {Function}
116
+ * @see {@link module:@stdlib/random/array/lognormal}
117
+ */
118
+ setReadOnly( ns, 'lognormal', require( '@stdlib/random-array-lognormal' ) );
119
+
120
+ /**
121
+ * @name minstd
122
+ * @memberof ns
123
+ * @readonly
124
+ * @type {Function}
125
+ * @see {@link module:@stdlib/random/array/minstd}
126
+ */
127
+ setReadOnly( ns, 'minstd', require( '@stdlib/random-array-minstd' ) );
128
+
129
+ /**
130
+ * @name minstdShuffle
131
+ * @memberof ns
132
+ * @readonly
133
+ * @type {Function}
134
+ * @see {@link module:@stdlib/random/array/minstd-shuffle}
135
+ */
136
+ setReadOnly( ns, 'minstdShuffle', require( '@stdlib/random-array-minstd-shuffle' ) );
137
+
138
+ /**
139
+ * @name mt19937
140
+ * @memberof ns
141
+ * @readonly
142
+ * @type {Function}
143
+ * @see {@link module:@stdlib/random/array/mt19937}
144
+ */
145
+ setReadOnly( ns, 'mt19937', require( '@stdlib/random-array-mt19937' ) );
146
+
147
+ /**
148
+ * @name normal
149
+ * @memberof ns
150
+ * @readonly
151
+ * @type {Function}
152
+ * @see {@link module:@stdlib/random/array/normal}
153
+ */
154
+ setReadOnly( ns, 'normal', require( '@stdlib/random-array-normal' ) );
155
+
156
+ /**
157
+ * @name randu
158
+ * @memberof ns
159
+ * @readonly
160
+ * @type {Function}
161
+ * @see {@link module:@stdlib/random/array/randu}
162
+ */
163
+ setReadOnly( ns, 'randu', require( '@stdlib/random-array-randu' ) );
164
+
165
+ /**
166
+ * @name uniform
167
+ * @memberof ns
168
+ * @readonly
169
+ * @type {Function}
170
+ * @see {@link module:@stdlib/random/array/uniform}
171
+ */
172
+ setReadOnly( ns, 'uniform', require( '@stdlib/random-array-uniform' ) );
173
+
174
+
175
+ // EXPORTS //
176
+
177
+ module.exports = ns;
package/package.json ADDED
@@ -0,0 +1,151 @@
1
+ {
2
+ "name": "@stdlib/random-array",
3
+ "version": "0.1.0",
4
+ "description": "Pseudorandom number generator array creation functions.",
5
+ "license": "Apache-2.0",
6
+ "author": {
7
+ "name": "The Stdlib Authors",
8
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
9
+ },
10
+ "contributors": [
11
+ {
12
+ "name": "The Stdlib Authors",
13
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
14
+ }
15
+ ],
16
+ "main": "./lib",
17
+ "directories": {
18
+ "doc": "./docs",
19
+ "example": "./examples",
20
+ "lib": "./lib",
21
+ "test": "./test"
22
+ },
23
+ "types": "./docs/types",
24
+ "scripts": {
25
+ "test": "make test",
26
+ "test-cov": "make test-cov",
27
+ "examples": "make examples",
28
+ "benchmark": "make benchmark"
29
+ },
30
+ "homepage": "https://stdlib.io",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git://github.com/stdlib-js/random-array.git"
34
+ },
35
+ "bugs": {
36
+ "url": "https://github.com/stdlib-js/stdlib/issues"
37
+ },
38
+ "dependencies": {
39
+ "@stdlib/random-array-arcsine": "^0.1.0",
40
+ "@stdlib/random-array-beta": "^0.0.1",
41
+ "@stdlib/random-array-betaprime": "^0.1.0",
42
+ "@stdlib/random-array-cosine": "^0.1.0",
43
+ "@stdlib/random-array-discrete-uniform": "^0.1.0",
44
+ "@stdlib/random-array-exponential": "^0.1.0",
45
+ "@stdlib/random-array-gamma": "^0.1.0",
46
+ "@stdlib/random-array-invgamma": "^0.1.0",
47
+ "@stdlib/random-array-lognormal": "^0.1.0",
48
+ "@stdlib/random-array-minstd": "^0.1.0",
49
+ "@stdlib/random-array-minstd-shuffle": "^0.1.0",
50
+ "@stdlib/random-array-mt19937": "^0.1.0",
51
+ "@stdlib/random-array-normal": "^0.1.0",
52
+ "@stdlib/random-array-randu": "^0.1.0",
53
+ "@stdlib/random-array-uniform": "^0.1.0",
54
+ "@stdlib/utils-define-read-only-property": "^0.1.0"
55
+ },
56
+ "devDependencies": {
57
+ "@stdlib/array-base-filled-by": "^0.1.0",
58
+ "@stdlib/array-float32": "^0.1.0",
59
+ "@stdlib/array-float64": "^0.1.0",
60
+ "@stdlib/array-int32": "^0.1.0",
61
+ "@stdlib/array-typed-real-ctors": "^0.1.0",
62
+ "@stdlib/array-typed-real-dtypes": "^0.1.0",
63
+ "@stdlib/array-typed-real-float-ctors": "^0.1.0",
64
+ "@stdlib/array-typed-real-float-dtypes": "^0.1.0",
65
+ "@stdlib/array-uint32": "^0.1.0",
66
+ "@stdlib/assert-has-own-property": "^0.1.0",
67
+ "@stdlib/assert-is-int32array": "^0.1.0",
68
+ "@stdlib/assert-is-nonnegative-integer": "^0.1.0",
69
+ "@stdlib/assert-is-number": "^0.1.0",
70
+ "@stdlib/assert-is-plain-object": "^0.1.0",
71
+ "@stdlib/assert-is-uint32array": "^0.1.0",
72
+ "@stdlib/bench": "^0.1.0",
73
+ "@stdlib/console-log-each": "^0.1.0",
74
+ "@stdlib/constants-int32-max": "^0.1.0",
75
+ "@stdlib/constants-uint32-max": "^0.1.0",
76
+ "@stdlib/math-base-assert-is-nan": "^0.1.0",
77
+ "@stdlib/math-base-assert-is-nanf": "^0.1.0",
78
+ "@stdlib/math-base-special-pow": "^0.1.0",
79
+ "@stdlib/random-base-arcsine": "^0.1.0",
80
+ "@stdlib/random-base-beta": "^0.1.0",
81
+ "@stdlib/random-base-betaprime": "^0.1.0",
82
+ "@stdlib/random-base-cosine": "^0.1.0",
83
+ "@stdlib/random-base-discrete-uniform": "^0.1.0",
84
+ "@stdlib/random-base-exponential": "^0.1.0",
85
+ "@stdlib/random-base-gamma": "^0.1.0",
86
+ "@stdlib/random-base-geometric": "^0.1.0",
87
+ "@stdlib/random-base-invgamma": "^0.1.0",
88
+ "@stdlib/random-base-lognormal": "^0.1.0",
89
+ "@stdlib/random-base-minstd": "^0.1.0",
90
+ "@stdlib/random-base-minstd-shuffle": "^0.1.0",
91
+ "@stdlib/random-base-mt19937": "^0.1.0",
92
+ "@stdlib/random-base-normal": "^0.1.0",
93
+ "@stdlib/random-base-randu": "^0.1.0",
94
+ "@stdlib/random-base-uniform": "^0.1.0",
95
+ "@stdlib/strided-base-binary": "^0.1.0",
96
+ "@stdlib/strided-base-nullary": "^0.1.0",
97
+ "@stdlib/strided-base-unary": "^0.1.0",
98
+ "@stdlib/string-format": "^0.1.0",
99
+ "@stdlib/utils-constant-function": "^0.1.0",
100
+ "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.1.0",
101
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0",
102
+ "@stdlib/utils-define-nonenumerable-read-write-accessor": "^0.1.0",
103
+ "@stdlib/utils-keys": "^0.1.0",
104
+ "@stdlib/utils-noop": "^0.1.0",
105
+ "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
106
+ "istanbul": "^0.4.1",
107
+ "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
108
+ },
109
+ "engines": {
110
+ "node": ">=0.10.0",
111
+ "npm": ">2.7.0"
112
+ },
113
+ "os": [
114
+ "aix",
115
+ "darwin",
116
+ "freebsd",
117
+ "linux",
118
+ "macos",
119
+ "openbsd",
120
+ "sunos",
121
+ "win32",
122
+ "windows"
123
+ ],
124
+ "keywords": [
125
+ "stdlib",
126
+ "standard",
127
+ "library",
128
+ "std",
129
+ "lib",
130
+ "mathematics",
131
+ "math",
132
+ "statistics",
133
+ "stats",
134
+ "prng",
135
+ "rng",
136
+ "pseudorandom",
137
+ "random",
138
+ "rand",
139
+ "generator",
140
+ "seed",
141
+ "seedable",
142
+ "vector",
143
+ "array",
144
+ "element-wise",
145
+ "elementwise"
146
+ ],
147
+ "funding": {
148
+ "type": "opencollective",
149
+ "url": "https://opencollective.com/stdlib"
150
+ }
151
+ }