@stdlib/random-array-invgamma 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,440 @@
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
+ # Inverse Gamma Random Numbers
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
+ > Create an array containing pseudorandom numbers drawn from an [inverse gamma][@stdlib/random/base/invgamma] distribution.
37
+
38
+ <section class="installation">
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ npm install @stdlib/random-array-invgamma
44
+ ```
45
+
46
+ </section>
47
+
48
+ <section class="usage">
49
+
50
+ ## Usage
51
+
52
+ ```javascript
53
+ var invgamma = require( '@stdlib/random-array-invgamma' );
54
+ ```
55
+
56
+ #### invgamma( len, alpha, beta\[, options] )
57
+
58
+ Returns an array containing pseudorandom numbers drawn from an [inverse gamma][@stdlib/random/base/invgamma] distribution.
59
+
60
+ ```javascript
61
+ var out = invgamma( 10, 2.0, 5.0 );
62
+ // returns <Float64Array>
63
+ ```
64
+
65
+ The function has the following parameters:
66
+
67
+ - **len**: output array length.
68
+ - **alpha**: shape parameter.
69
+ - **beta**: scale parameter.
70
+ - **options**: function options.
71
+
72
+ The function accepts the following `options`:
73
+
74
+ - **dtype**: output array data type. Must be a [real-valued floating-point data type][@stdlib/array/typed-real-float-dtypes] or "generic". Default: `'float64'`.
75
+
76
+ By default, the function returns a [`Float64Array`][@stdlib/array/float64]. To return an array having a different data type, set the `dtype` option.
77
+
78
+ ```javascript
79
+ var opts = {
80
+ 'dtype': 'generic'
81
+ };
82
+
83
+ var out = invgamma( 10, 2.0, 5.0, opts );
84
+ // returns [...]
85
+ ```
86
+
87
+ #### invgamma.factory( \[alpha, beta, ]\[options] )
88
+
89
+ Returns a function for creating arrays containing pseudorandom numbers drawn from an [inverse gamma][@stdlib/random/base/invgamma] distribution.
90
+
91
+ ```javascript
92
+ var random = invgamma.factory();
93
+
94
+ var out = random( 10, 2.0, 5.0 );
95
+ // returns <Float64Array>
96
+
97
+ var len = out.length;
98
+ // returns 10
99
+ ```
100
+
101
+ If provided `alpha` and `beta`, the returned generator returns random variates from the specified distribution.
102
+
103
+ ```javascript
104
+ var random = invgamma.factory( 2.0, 5.0 );
105
+
106
+ var out = random( 10 );
107
+ // returns <Float64Array>
108
+
109
+ out = random( 10 );
110
+ // returns <Float64Array>
111
+ ```
112
+
113
+ If not provided `alpha` and `beta`, the returned generator requires that both parameters be provided at each invocation.
114
+
115
+ ```javascript
116
+ var random = invgamma.factory();
117
+
118
+ var out = random( 10, 2.0, 5.0 );
119
+ // returns <Float64Array>
120
+
121
+ out = random( 10, 2.0, 5.0 );
122
+ // returns <Float64Array>
123
+ ```
124
+
125
+ The function accepts the following `options`:
126
+
127
+ - **prng**: pseudorandom number generator for generating uniformly distributed pseudorandom numbers on the interval `[0,1)`. If provided, the function **ignores** both the `state` and `seed` options. In order to seed the underlying pseudorandom number generator, one must seed the provided `prng` (assuming the provided `prng` is seedable).
128
+ - **seed**: pseudorandom number generator seed.
129
+ - **state**: a [`Uint32Array`][@stdlib/array/uint32] containing pseudorandom number generator state. If provided, the function ignores the `seed` option.
130
+ - **copy**: `boolean` indicating whether to copy a provided pseudorandom number generator state. Setting this option to `false` allows sharing state between two or more pseudorandom number generators. Setting this option to `true` ensures that an underlying generator has exclusive control over its internal state. Default: `true`.
131
+ - **dtype**: default output array data type. Must be a [real-valued floating-point data type][@stdlib/array/typed-real-float-dtypes] or "generic". Default: `'float64'`.
132
+
133
+ To use a custom PRNG as the underlying source of uniformly distributed pseudorandom numbers, set the `prng` option.
134
+
135
+ ```javascript
136
+ var minstd = require( '@stdlib/random-base-minstd' );
137
+
138
+ var opts = {
139
+ 'prng': minstd.normalized
140
+ };
141
+ var random = invgamma.factory( 2.0, 5.0, opts );
142
+
143
+ var out = random( 10 );
144
+ // returns <Float64Array>
145
+ ```
146
+
147
+ To seed the underlying pseudorandom number generator, set the `seed` option.
148
+
149
+ ```javascript
150
+ var opts = {
151
+ 'seed': 12345
152
+ };
153
+ var random = invgamma.factory( 2.0, 5.0, opts );
154
+
155
+ var out = random( 10, opts );
156
+ // returns <Float64Array>
157
+ ```
158
+
159
+ The returned function accepts the following `options`:
160
+
161
+ - **dtype**: output array data type. Must be a [real-valued floating-point data type][@stdlib/array/typed-real-float-dtypes] or "generic". This overrides the default output array data type.
162
+
163
+ To override the default output array data type, set the `dtype` option.
164
+
165
+ ```javascript
166
+ var random = invgamma.factory( 2.0, 5.0 );
167
+
168
+ var out = random( 10 );
169
+ // returns <Float64Array>
170
+
171
+ var opts = {
172
+ 'dtype': 'generic'
173
+ };
174
+ out = random( 10, opts );
175
+ // returns [...]
176
+ ```
177
+
178
+ #### invgamma.PRNG
179
+
180
+ The underlying pseudorandom number generator.
181
+
182
+ ```javascript
183
+ var prng = invgamma.PRNG;
184
+ // returns <Function>
185
+ ```
186
+
187
+ #### invgamma.seed
188
+
189
+ The value used to seed the underlying pseudorandom number generator.
190
+
191
+ ```javascript
192
+ var seed = invgamma.seed;
193
+ // returns <Uint32Array>
194
+ ```
195
+
196
+ If the `factory` method is provided a PRNG for uniformly distributed numbers, the associated property value on the returned function is `null`.
197
+
198
+ ```javascript
199
+ var minstd = require( '@stdlib/random-base-minstd-shuffle' ).normalized;
200
+
201
+ var random = invgamma.factory( 2.0, 5.0, {
202
+ 'prng': minstd
203
+ });
204
+
205
+ var seed = random.seed;
206
+ // returns null
207
+ ```
208
+
209
+ #### invgamma.seedLength
210
+
211
+ Length of underlying pseudorandom number generator seed.
212
+
213
+ ```javascript
214
+ var len = invgamma.seedLength;
215
+ // returns <number>
216
+ ```
217
+
218
+ If the `factory` method is provided a PRNG for uniformly distributed numbers, the associated property value on the returned function is `null`.
219
+
220
+ ```javascript
221
+ var minstd = require( '@stdlib/random-base-minstd-shuffle' ).normalized;
222
+
223
+ var random = invgamma.factory( 2.0, 5.0, {
224
+ 'prng': minstd
225
+ });
226
+
227
+ var len = random.seedLength;
228
+ // returns null
229
+ ```
230
+
231
+ #### invgamma.state
232
+
233
+ Writable property for getting and setting the underlying pseudorandom number generator state.
234
+
235
+ ```javascript
236
+ var state = invgamma.state;
237
+ // returns <Uint32Array>
238
+ ```
239
+
240
+ If the `factory` method is provided a PRNG for uniformly distributed numbers, the associated property value on the returned function is `null`.
241
+
242
+ ```javascript
243
+ var minstd = require( '@stdlib/random-base-minstd-shuffle' ).normalized;
244
+
245
+ var random = invgamma.factory( 2.0, 5.0, {
246
+ 'prng': minstd
247
+ });
248
+
249
+ var state = random.state;
250
+ // returns null
251
+ ```
252
+
253
+ #### invgamma.stateLength
254
+
255
+ Length of underlying pseudorandom number generator state.
256
+
257
+ ```javascript
258
+ var len = invgamma.stateLength;
259
+ // returns <number>
260
+ ```
261
+
262
+ If the `factory` method is provided a PRNG for uniformly distributed numbers, the associated property value on the returned function is `null`.
263
+
264
+ ```javascript
265
+ var minstd = require( '@stdlib/random-base-minstd-shuffle' ).normalized;
266
+
267
+ var random = invgamma.factory( 2.0, 5.0, {
268
+ 'prng': minstd
269
+ });
270
+
271
+ var len = random.stateLength;
272
+ // returns null
273
+ ```
274
+
275
+ #### invgamma.byteLength
276
+
277
+ Size (in bytes) of underlying pseudorandom number generator state.
278
+
279
+ ```javascript
280
+ var sz = invgamma.byteLength;
281
+ // returns <number>
282
+ ```
283
+
284
+ If the `factory` method is provided a PRNG for uniformly distributed numbers, the associated property value on the returned function is `null`.
285
+
286
+ ```javascript
287
+ var minstd = require( '@stdlib/random-base-minstd-shuffle' ).normalized;
288
+
289
+ var random = invgamma.factory( 2.0, 5.0, {
290
+ 'prng': minstd
291
+ });
292
+
293
+ var sz = random.byteLength;
294
+ // returns null
295
+ ```
296
+
297
+ </section>
298
+
299
+ <!-- /.usage -->
300
+
301
+ <section class="notes">
302
+
303
+ ## Notes
304
+
305
+ - If PRNG state is "shared" (meaning a state array was provided during function creation and **not** copied) and one sets the underlying generator state to a state array having a different length, the function returned by the `factory` method does **not** update the existing shared state and, instead, points to the newly provided state array. In order to synchronize the output of the underlying generator according to the new shared state array, the state array for **each** relevant creation function and/or PRNG must be **explicitly** set.
306
+ - If PRNG state is "shared" and one sets the underlying generator state to a state array of the same length, the PRNG state is updated (along with the state of all other creation functions and/or PRNGs sharing the PRNG's state array).
307
+
308
+ </section>
309
+
310
+ <!-- /.notes -->
311
+
312
+ <section class="examples">
313
+
314
+ ## Examples
315
+
316
+ <!-- eslint no-undef: "error" -->
317
+
318
+ ```javascript
319
+ var logEach = require( '@stdlib/console-log-each' );
320
+ var invgamma = require( '@stdlib/random-array-invgamma' );
321
+
322
+ // Create a function for generating random arrays originating from the same state:
323
+ var random = invgamma.factory( 2.0, 5.0, {
324
+ 'state': invgamma.state,
325
+ 'copy': true
326
+ });
327
+
328
+ // Generate 3 arrays:
329
+ var x1 = random( 5 );
330
+ var x2 = random( 5 );
331
+ var x3 = random( 5 );
332
+
333
+ // Print the contents:
334
+ logEach( '%f, %f, %f', x1, x2, x3 );
335
+
336
+ // Create another function for generating random arrays with the original state:
337
+ random = invgamma.factory( 2.0, 5.0, {
338
+ 'state': invgamma.state,
339
+ 'copy': true
340
+ });
341
+
342
+ // Generate a single array which replicates the above pseudorandom number generation sequence:
343
+ var x4 = random( 15 );
344
+
345
+ // Print the contents:
346
+ logEach( '%f', x4 );
347
+ ```
348
+
349
+ </section>
350
+
351
+ <!-- /.examples -->
352
+
353
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
354
+
355
+ <section class="related">
356
+
357
+ </section>
358
+
359
+ <!-- /.related -->
360
+
361
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
362
+
363
+
364
+ <section class="main-repo" >
365
+
366
+ * * *
367
+
368
+ ## Notice
369
+
370
+ 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.
371
+
372
+ 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].
373
+
374
+ #### Community
375
+
376
+ [![Chat][chat-image]][chat-url]
377
+
378
+ ---
379
+
380
+ ## License
381
+
382
+ See [LICENSE][stdlib-license].
383
+
384
+
385
+ ## Copyright
386
+
387
+ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
388
+
389
+ </section>
390
+
391
+ <!-- /.stdlib -->
392
+
393
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
394
+
395
+ <section class="links">
396
+
397
+ [npm-image]: http://img.shields.io/npm/v/@stdlib/random-array-invgamma.svg
398
+ [npm-url]: https://npmjs.org/package/@stdlib/random-array-invgamma
399
+
400
+ [test-image]: https://github.com/stdlib-js/random-array-invgamma/actions/workflows/test.yml/badge.svg?branch=v0.1.0
401
+ [test-url]: https://github.com/stdlib-js/random-array-invgamma/actions/workflows/test.yml?query=branch:v0.1.0
402
+
403
+ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/random-array-invgamma/main.svg
404
+ [coverage-url]: https://codecov.io/github/stdlib-js/random-array-invgamma?branch=main
405
+
406
+ <!--
407
+
408
+ [dependencies-image]: https://img.shields.io/david/stdlib-js/random-array-invgamma.svg
409
+ [dependencies-url]: https://david-dm.org/stdlib-js/random-array-invgamma/main
410
+
411
+ -->
412
+
413
+ [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
414
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
415
+
416
+ [stdlib]: https://github.com/stdlib-js/stdlib
417
+
418
+ [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
419
+
420
+ [umd]: https://github.com/umdjs/umd
421
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
422
+
423
+ [deno-url]: https://github.com/stdlib-js/random-array-invgamma/tree/deno
424
+ [umd-url]: https://github.com/stdlib-js/random-array-invgamma/tree/umd
425
+ [esm-url]: https://github.com/stdlib-js/random-array-invgamma/tree/esm
426
+ [branches-url]: https://github.com/stdlib-js/random-array-invgamma/blob/main/branches.md
427
+
428
+ [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/random-array-invgamma/main/LICENSE
429
+
430
+ [@stdlib/random/base/invgamma]: https://www.npmjs.com/package/@stdlib/random-base-invgamma
431
+
432
+ [@stdlib/array/typed-real-float-dtypes]: https://www.npmjs.com/package/@stdlib/array-typed-real-float-dtypes
433
+
434
+ [@stdlib/array/uint32]: https://www.npmjs.com/package/@stdlib/array-uint32
435
+
436
+ [@stdlib/array/float64]: https://www.npmjs.com/package/@stdlib/array-float64
437
+
438
+ </section>
439
+
440
+ <!-- /.links -->
@@ -0,0 +1,3 @@
1
+ /// <reference path="../docs/types/index.d.ts" />
2
+ import invgamma from '../docs/types/index';
3
+ export = invgamma;
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";var y=function(t,r){return function(){return r||t((r={exports:{}}).exports,r),r.exports}};var b=y(function(ue,H){H.exports={dtype:"float64"}});var O=y(function(se,G){
2
+ var J=require('@stdlib/array-typed-real-float-dtypes/dist'),K=require('@stdlib/assert-is-plain-object/dist'),M=require('@stdlib/assert-has-own-property/dist'),N=require('@stdlib/error-tools-fmtprodmsg/dist'),w=J();w.push("generic");function Q(t,r){return K(r)?M(r,"dtype")&&(t.dtype=r.dtype,w.indexOf(t.dtype)<0)?new TypeError(N('1eB4S',"dtype",w.join('", "'),t.dtype)):null:new TypeError(N('1eB2V',r));}G.exports=Q
3
+ });var R=y(function(oe,F){
4
+ var S=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,d=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),l=require('@stdlib/utils-define-nonenumerable-read-only-accessor/dist'),x=require('@stdlib/utils-define-nonenumerable-read-write-accessor/dist'),U=require('@stdlib/utils-constant-function/dist'),X=require('@stdlib/utils-noop/dist'),m=require('@stdlib/random-base-invgamma/dist'),E=require('@stdlib/array-typed-real-float-ctors/dist'),T=require('@stdlib/array-base-filled-by/dist'),Z=require('@stdlib/strided-base-nullary/dist'),_=require('@stdlib/strided-base-binary/dist'),j=require('@stdlib/error-tools-fmtprodmsg/dist'),$=b(),p=O();function ee(){var t,r,v,e,a,s;if(v={dtype:$.dtype},r=arguments.length,r===0)a=m,e=P;else if(r===1){if(t=arguments[0],a=m.factory(t),s=p(v,t),s)throw s;e=P}else if(r===2)a=m.factory(arguments[0],arguments[1]),e=L;else if(r===3){if(t=arguments[2],a=m.factory(arguments[0],arguments[1],t),s=p(v,t),s)throw s;e=L}return t&&t.prng?(d(e,"seed",null),d(e,"seedLength",null),x(e,"state",U(null),X),d(e,"stateLength",null),d(e,"byteLength",null)):(l(e,"seed",B),l(e,"seedLength",D),x(e,"state",Y,k),l(e,"stateLength",I),l(e,"byteLength",W)),d(e,"PRNG",a.PRNG),e;function L(n,c){var g,f,o,i,u;if(!S(n))throw new TypeError(j('1eB2d',n));if(u={},arguments.length>1&&(o=p(u,c),o))throw o;return i=u.dtype||v.dtype,i==="generic"?T(n,a):(g=E(i),f=new g(n),Z([f],[n],[1],a),f)}function P(n,c,g,f){var o,i,u,h,q;if(!S(n))throw new TypeError(j('1eB2d',n));if(q={},arguments.length>3&&(u=p(q,f),u))throw u;if(h=q.dtype||v.dtype,h==="generic")return T(n,C);return o=E(h),i=new o(n),_([[c],[g],i],[n],[0,0,1],a),i;function C(){return a(c,g)}}function B(){return e.PRNG.seed}function D(){return e.PRNG.seedLength}function I(){return e.PRNG.stateLength}function W(){return e.PRNG.byteLength}function Y(){return e.PRNG.state}function k(n){e.PRNG.state=n}}F.exports=ee
5
+ });var A=y(function(ve,V){
6
+ var re=R(),te=re();V.exports=te
7
+ });var ne=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),z=A(),ae=R();ne(z,"factory",ae);module.exports=z;
8
+ /** @license Apache-2.0 */
9
+ //# sourceMappingURL=index.js.map