@stdlib/random-streams-improved-ziggurat 0.0.6 → 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 +30 -0
- package/LICENSE +0 -304
- package/NOTICE +1 -1
- package/README.md +63 -77
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +1 -1
- package/lib/factory.js +8 -2
- package/lib/index.js +4 -4
- package/lib/main.js +2 -2
- package/lib/object_mode.js +4 -3
- package/lib/validate.js +9 -8
- package/package.json +23 -51
- package/bin/cli +0 -183
- package/docs/repl.txt +0 -239
- package/docs/types/test.ts +0 -103
- package/docs/usage.txt +0 -15
- package/etc/cli_opts.json +0 -24
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
CHANGED
|
@@ -175,307 +175,3 @@
|
|
|
175
175
|
of your accepting any such warranty or additional liability.
|
|
176
176
|
|
|
177
177
|
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
182
|
-
|
|
183
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
184
|
-
obtaining a copy of the software and accompanying documentation covered by this
|
|
185
|
-
license (the "Software") to use, reproduce, display, distribute, execute, and
|
|
186
|
-
transmit the Software, and to prepare derivative works of the Software, and to
|
|
187
|
-
permit third-parties to whom the Software is furnished to do so, all subject to
|
|
188
|
-
the following:
|
|
189
|
-
|
|
190
|
-
The copyright notices in the Software and this entire statement, including the
|
|
191
|
-
above license grant, this restriction and the following disclaimer, must be
|
|
192
|
-
included in all copies of the Software, in whole or in part, and all derivative
|
|
193
|
-
works of the Software, unless such copies or derivative works are solely in the
|
|
194
|
-
form of machine-executable object code generated by a source language processor.
|
|
195
|
-
|
|
196
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
197
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
198
|
-
FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
199
|
-
COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES
|
|
200
|
-
OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
|
201
|
-
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
DEPENDENCIES
|
|
207
|
-
|
|
208
|
-
The library links against the following external libraries, which have their own
|
|
209
|
-
licenses:
|
|
210
|
-
|
|
211
|
-
* OpenBLAS <https://raw.githubusercontent.com/xianyi/OpenBLAS/
|
|
212
|
-
def146efed8d5908ea04e22668feeab7099599a0/LICENSE>
|
|
213
|
-
|
|
214
|
-
Copyright (c) 2011-2014, The OpenBLAS Project
|
|
215
|
-
All rights reserved.
|
|
216
|
-
|
|
217
|
-
Redistribution and use in source and binary forms, with or without
|
|
218
|
-
modification, are permitted provided that the following conditions are
|
|
219
|
-
met:
|
|
220
|
-
|
|
221
|
-
1. Redistributions of source code must retain the above copyright
|
|
222
|
-
notice, this list of conditions and the following disclaimer.
|
|
223
|
-
|
|
224
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
225
|
-
notice, this list of conditions and the following disclaimer in
|
|
226
|
-
the documentation and/or other materials provided with the
|
|
227
|
-
distribution.
|
|
228
|
-
|
|
229
|
-
3. Neither the name of the OpenBLAS project nor the names of
|
|
230
|
-
its contributors may be used to endorse or promote products
|
|
231
|
-
derived from this software without specific prior written
|
|
232
|
-
permission.
|
|
233
|
-
|
|
234
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
235
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
236
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
237
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
238
|
-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
239
|
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
240
|
-
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
241
|
-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
242
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
243
|
-
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
* Electron <https://raw.githubusercontent.com/electron/electron/
|
|
247
|
-
c4cfb3e7110266b9d7ad80e1ae097c4db564501c/LICENSE>
|
|
248
|
-
|
|
249
|
-
Copyright (c) 2013-2017 GitHub Inc.
|
|
250
|
-
|
|
251
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
252
|
-
a copy of this software and associated documentation files (the
|
|
253
|
-
"Software"), to deal in the Software without restriction, including
|
|
254
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
255
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
256
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
257
|
-
the following conditions:
|
|
258
|
-
|
|
259
|
-
The above copyright notice and this permission notice shall be
|
|
260
|
-
included in all copies or substantial portions of the Software.
|
|
261
|
-
|
|
262
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
263
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
264
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
265
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
266
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
267
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
268
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
* Boost <http://www.boost.org/LICENSE_1_0.txt>
|
|
272
|
-
|
|
273
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
274
|
-
|
|
275
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
276
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
277
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
278
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
279
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
280
|
-
do so, all subject to the following:
|
|
281
|
-
|
|
282
|
-
The copyright notices in the Software and this entire statement, including
|
|
283
|
-
the above license grant, this restriction and the following disclaimer,
|
|
284
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
285
|
-
all derivative works of the Software, unless such copies or derivative
|
|
286
|
-
works are solely in the form of machine-executable object code generated by
|
|
287
|
-
a source language processor.
|
|
288
|
-
|
|
289
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
290
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
291
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
292
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
293
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
294
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
295
|
-
DEALINGS IN THE SOFTWARE.
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
* Cephes <http://www.netlib.org/cephes/readme>
|
|
299
|
-
|
|
300
|
-
Copyright (c) 1984-2000 Stephen L. Moshier
|
|
301
|
-
|
|
302
|
-
Some software in this archive may be from the book _Methods and Programs for
|
|
303
|
-
Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989)
|
|
304
|
-
or from the Cephes Mathematical Library, a commercial product. In either event,
|
|
305
|
-
it is copyrighted by the author. What you see here may be used freely but it
|
|
306
|
-
comes with no support or guarantee.
|
|
307
|
-
|
|
308
|
-
Stephen L. Moshier
|
|
309
|
-
moshier@na-net.ornl.gov
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
ATTRIBUTION
|
|
314
|
-
|
|
315
|
-
The library contains implementations from the following external libraries,
|
|
316
|
-
which have their own licenses:
|
|
317
|
-
|
|
318
|
-
* FreeBSD <https://svnweb.freebsd.org/>
|
|
319
|
-
|
|
320
|
-
Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
|
|
321
|
-
|
|
322
|
-
Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
323
|
-
Permission to use, copy, modify, and distribute this
|
|
324
|
-
software is freely granted, provided that this notice
|
|
325
|
-
is preserved.
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
* FDLIBM <http://www.netlib.org/fdlibm/>
|
|
329
|
-
|
|
330
|
-
Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
|
|
331
|
-
|
|
332
|
-
Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
333
|
-
Permission to use, copy, modify, and distribute this
|
|
334
|
-
software is freely granted, provided that this notice
|
|
335
|
-
is preserved.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>
|
|
339
|
-
|
|
340
|
-
Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
341
|
-
|
|
342
|
-
Redistribution and use in source and binary forms, with or without
|
|
343
|
-
modification, are permitted provided that the following conditions are
|
|
344
|
-
met:
|
|
345
|
-
|
|
346
|
-
* Redistributions of source code must retain the above copyright
|
|
347
|
-
notice, this list of conditions and the following disclaimer.
|
|
348
|
-
* Redistributions in binary form must reproduce the above
|
|
349
|
-
copyright notice, this list of conditions and the following disclaimer
|
|
350
|
-
in the documentation and/or other materials provided with the
|
|
351
|
-
distribution.
|
|
352
|
-
* Neither the name of Google Inc. nor the names of its
|
|
353
|
-
contributors may be used to endorse or promote products derived from
|
|
354
|
-
this software without specific prior written permission.
|
|
355
|
-
|
|
356
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
357
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
358
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
359
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
360
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
361
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
362
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
363
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
364
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
365
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
366
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
* SLATEC Common Mathematical Library <http://www.netlib.no/netlib/slatec/>
|
|
370
|
-
|
|
371
|
-
Public domain.
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
* ESLint <https://raw.githubusercontent.com/eslint/eslint/master/LICENSE>
|
|
375
|
-
|
|
376
|
-
Copyright JS Foundation and other contributors, https://js.foundation
|
|
377
|
-
|
|
378
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
379
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
380
|
-
in the Software without restriction, including without limitation the rights
|
|
381
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
382
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
383
|
-
furnished to do so, subject to the following conditions:
|
|
384
|
-
|
|
385
|
-
The above copyright notice and this permission notice shall be included in
|
|
386
|
-
all copies or substantial portions of the Software.
|
|
387
|
-
|
|
388
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
389
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
390
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
391
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
392
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
393
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
394
|
-
THE SOFTWARE.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
* StatsFuns.jl <https://raw.githubusercontent.com/JuliaStats/StatsFuns.jl/
|
|
398
|
-
e66dd973650c375bc1739c820e5b96bb5bd000a8/LICENSE.md>
|
|
399
|
-
|
|
400
|
-
Copyright (c) 2015: Dahua Lin.
|
|
401
|
-
|
|
402
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
403
|
-
a copy of this software and associated documentation files (the
|
|
404
|
-
"Software"), to deal in the Software without restriction, including
|
|
405
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
406
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
407
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
408
|
-
the following conditions:
|
|
409
|
-
|
|
410
|
-
The above copyright notice and this permission notice shall be
|
|
411
|
-
included in all copies or substantial portions of the Software.
|
|
412
|
-
|
|
413
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
414
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
415
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
416
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
417
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
418
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
419
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
* SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/
|
|
423
|
-
SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE>
|
|
424
|
-
|
|
425
|
-
The MIT License (MIT)
|
|
426
|
-
|
|
427
|
-
Copyright (c) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others:
|
|
428
|
-
|
|
429
|
-
https://github.com/JuliaMath/SpecialFunctions.jl/graphs/contributors
|
|
430
|
-
|
|
431
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
432
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
433
|
-
in the Software without restriction, including without limitation the rights
|
|
434
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
435
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
436
|
-
furnished to do so, subject to the following conditions:
|
|
437
|
-
|
|
438
|
-
The above copyright notice and this permission notice shall be included in all
|
|
439
|
-
copies or substantial portions of the Software.
|
|
440
|
-
|
|
441
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
442
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
443
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
444
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
445
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
446
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
447
|
-
SOFTWARE.
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
* MT19937 <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/
|
|
451
|
-
mt19937ar.c>
|
|
452
|
-
|
|
453
|
-
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
|
454
|
-
All rights reserved.
|
|
455
|
-
|
|
456
|
-
Redistribution and use in source and binary forms, with or without
|
|
457
|
-
modification, are permitted provided that the following conditions
|
|
458
|
-
are met:
|
|
459
|
-
|
|
460
|
-
1. Redistributions of source code must retain the above copyright
|
|
461
|
-
notice, this list of conditions and the following disclaimer.
|
|
462
|
-
|
|
463
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
464
|
-
notice, this list of conditions and the following disclaimer in the
|
|
465
|
-
documentation and/or other materials provided with the distribution.
|
|
466
|
-
|
|
467
|
-
3. The names of its contributors may not be used to endorse or promote
|
|
468
|
-
products derived from this software without specific prior written
|
|
469
|
-
permission.
|
|
470
|
-
|
|
471
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
472
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
473
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
474
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
475
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
476
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
477
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
478
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
479
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
480
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
481
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2023 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -18,9 +18,20 @@ limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
-->
|
|
20
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
|
+
|
|
21
32
|
# Standard Normal Random Numbers
|
|
22
33
|
|
|
23
|
-
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
|
|
34
|
+
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
|
|
24
35
|
|
|
25
36
|
> Create a [readable stream][readable-stream] for generating pseudorandom numbers drawn from a [standard normal][normal] distribution using the [Improved Ziggurat][@stdlib/random/base/improved-ziggurat] algorithm.
|
|
26
37
|
|
|
@@ -450,92 +461,39 @@ stream.pipe( iStream );
|
|
|
450
461
|
|
|
451
462
|
<!-- Section for describing a command-line interface. -->
|
|
452
463
|
|
|
453
|
-
* * *
|
|
454
|
-
|
|
455
|
-
<section class="cli">
|
|
456
|
-
|
|
457
|
-
## CLI
|
|
458
|
-
|
|
459
|
-
<section class="installation">
|
|
460
|
-
|
|
461
|
-
## Installation
|
|
462
|
-
|
|
463
|
-
To use the module as a general utility, install the module globally
|
|
464
|
-
|
|
465
|
-
```bash
|
|
466
|
-
npm install -g @stdlib/random-streams-improved-ziggurat
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
</section>
|
|
470
|
-
|
|
471
|
-
<section class="usage">
|
|
472
|
-
|
|
473
|
-
### Usage
|
|
474
464
|
|
|
475
|
-
```text
|
|
476
|
-
Usage: random-improved-ziggurat [options]
|
|
477
465
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
-h, --help Print this message.
|
|
481
|
-
-V, --version Print the package version.
|
|
482
|
-
--sep sep Separator used to join streamed data. Default: '\n'.
|
|
483
|
-
-n, --iter iterations Number of pseudorandom numbers.
|
|
484
|
-
--seed seed Pseudorandom number generator seed.
|
|
485
|
-
--state filepath Path to a file containing the pseudorandom number
|
|
486
|
-
generator state.
|
|
487
|
-
--snapshot filepath Output file path for saving the pseudorandom number
|
|
488
|
-
generator state upon exit.
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
</section>
|
|
492
|
-
|
|
493
|
-
<!-- /.usage -->
|
|
494
|
-
|
|
495
|
-
<!-- CLI usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
466
|
+
* * *
|
|
496
467
|
|
|
497
|
-
<section class="
|
|
468
|
+
<section class="references">
|
|
498
469
|
|
|
499
|
-
|
|
470
|
+
## References
|
|
500
471
|
|
|
501
|
-
-
|
|
502
|
-
-
|
|
472
|
+
- Doornik, Jurgen A. 2005. "An Improved Ziggurat Method to Generate Normal Random Samples." [<https://www.doornik.com/research/ziggurat.pdf>][@doornik:2005].
|
|
473
|
+
- Marsaglia, George, and Wai Wan Tsang. 2000. "The Ziggurat Method for Generating Random Variables." _Journal of Statistical Software_ 5 (1): 1–7. doi:[10.18637/jss.v005.i08][@marsaglia:2000b].
|
|
474
|
+
- Marsaglia, George. 1964. "Generating a Variable from the Tail of the Normal Distribution." _Technometrics_ 6 (1): 101–2. doi:[10.1080/00401706.1964.10490150][@marsaglia:1964b].
|
|
503
475
|
|
|
504
476
|
</section>
|
|
505
477
|
|
|
506
|
-
<!-- /.
|
|
507
|
-
|
|
508
|
-
<!-- CLI usage examples. -->
|
|
509
|
-
|
|
510
|
-
<section class="examples">
|
|
478
|
+
<!-- /.references -->
|
|
511
479
|
|
|
512
|
-
|
|
480
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
513
481
|
|
|
514
|
-
|
|
515
|
-
$ random-improved-ziggurat -n 10 --seed 1234
|
|
516
|
-
```
|
|
482
|
+
<section class="related">
|
|
517
483
|
|
|
518
|
-
|
|
484
|
+
## See Also
|
|
519
485
|
|
|
520
|
-
|
|
486
|
+
- <span class="package-name">[`@stdlib/random-streams-improved-ziggurat-cli`][@stdlib/random-streams-improved-ziggurat-cli]</span><span class="delimiter">: </span><span class="description">CLI package for use as a command-line utility.</span>
|
|
487
|
+
- <span class="package-name">[`@stdlib/random-base/improved-ziggurat`][@stdlib/random/base/improved-ziggurat]</span><span class="delimiter">: </span><span class="description">normally distributed pseudorandom numbers using the improved Ziggurat method.</span>
|
|
488
|
+
- <span class="package-name">[`@stdlib/random-iter/improved-ziggurat`][@stdlib/random/iter/improved-ziggurat]</span><span class="delimiter">: </span><span class="description">create an iterator for generating pseudorandom numbers drawn from a standard normal distribution using the Improved Ziggurat algorithm.</span>
|
|
489
|
+
- <span class="package-name">[`@stdlib/random-streams/box-muller`][@stdlib/random/streams/box-muller]</span><span class="delimiter">: </span><span class="description">create a readable stream for generating pseudorandom numbers drawn from a standard normal distribution using the Box-Muller transform.</span>
|
|
490
|
+
- <span class="package-name">[`@stdlib/random-streams/randn`][@stdlib/random/streams/randn]</span><span class="delimiter">: </span><span class="description">create a readable stream for generating pseudorandom numbers drawn from a standard normal distribution.</span>
|
|
521
491
|
|
|
522
492
|
</section>
|
|
523
493
|
|
|
524
|
-
<!-- /.
|
|
525
|
-
|
|
526
|
-
* * *
|
|
527
|
-
|
|
528
|
-
<section class="references">
|
|
529
|
-
|
|
530
|
-
## References
|
|
494
|
+
<!-- /.related -->
|
|
531
495
|
|
|
532
|
-
|
|
533
|
-
- Marsaglia, George, and Wai Wan Tsang. 2000. "The Ziggurat Method for Generating Random Variables." _Journal of Statistical Software_ 5 (1): 1–7. doi:[10.18637/jss.v005.i08][@marsaglia:2000b].
|
|
534
|
-
- Marsaglia, George. 1964. "Generating a Variable from the Tail of the Normal Distribution." _Technometrics_ 6 (1): 101–2. doi:[10.1080/00401706.1964.10490150][@marsaglia:1964b].
|
|
535
|
-
|
|
536
|
-
</section>
|
|
537
|
-
|
|
538
|
-
<!-- /.references -->
|
|
496
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
539
497
|
|
|
540
498
|
|
|
541
499
|
<section class="main-repo" >
|
|
@@ -561,7 +519,7 @@ See [LICENSE][stdlib-license].
|
|
|
561
519
|
|
|
562
520
|
## Copyright
|
|
563
521
|
|
|
564
|
-
Copyright © 2016-
|
|
522
|
+
Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
565
523
|
|
|
566
524
|
</section>
|
|
567
525
|
|
|
@@ -571,25 +529,43 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
571
529
|
|
|
572
530
|
<section class="links">
|
|
573
531
|
|
|
532
|
+
[@stdlib/random-streams-improved-ziggurat-cli]: https://www.npmjs.com/package/@stdlib/random-streams-improved-ziggurat-cli
|
|
533
|
+
|
|
574
534
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/random-streams-improved-ziggurat.svg
|
|
575
535
|
[npm-url]: https://npmjs.org/package/@stdlib/random-streams-improved-ziggurat
|
|
576
536
|
|
|
577
|
-
[test-image]: https://github.com/stdlib-js/random-streams-improved-ziggurat/actions/workflows/test.yml/badge.svg
|
|
578
|
-
[test-url]: https://github.com/stdlib-js/random-streams-improved-ziggurat/actions/workflows/test.yml
|
|
537
|
+
[test-image]: https://github.com/stdlib-js/random-streams-improved-ziggurat/actions/workflows/test.yml/badge.svg?branch=v0.1.0
|
|
538
|
+
[test-url]: https://github.com/stdlib-js/random-streams-improved-ziggurat/actions/workflows/test.yml?query=branch:v0.1.0
|
|
579
539
|
|
|
580
540
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/random-streams-improved-ziggurat/main.svg
|
|
581
541
|
[coverage-url]: https://codecov.io/github/stdlib-js/random-streams-improved-ziggurat?branch=main
|
|
582
542
|
|
|
543
|
+
<!--
|
|
544
|
+
|
|
583
545
|
[dependencies-image]: https://img.shields.io/david/stdlib-js/random-streams-improved-ziggurat.svg
|
|
584
546
|
[dependencies-url]: https://david-dm.org/stdlib-js/random-streams-improved-ziggurat/main
|
|
585
547
|
|
|
548
|
+
-->
|
|
549
|
+
|
|
586
550
|
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
587
|
-
[chat-url]: https://gitter.im
|
|
551
|
+
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
|
|
588
552
|
|
|
589
553
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
590
554
|
|
|
591
555
|
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
592
556
|
|
|
557
|
+
[cli-section]: https://github.com/stdlib-js/random-streams-improved-ziggurat#cli
|
|
558
|
+
[cli-url]: https://github.com/stdlib-js/random-streams-improved-ziggurat/tree/cli
|
|
559
|
+
[@stdlib/random-streams-improved-ziggurat]: https://github.com/stdlib-js/random-streams-improved-ziggurat/tree/main
|
|
560
|
+
|
|
561
|
+
[umd]: https://github.com/umdjs/umd
|
|
562
|
+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
563
|
+
|
|
564
|
+
[deno-url]: https://github.com/stdlib-js/random-streams-improved-ziggurat/tree/deno
|
|
565
|
+
[umd-url]: https://github.com/stdlib-js/random-streams-improved-ziggurat/tree/umd
|
|
566
|
+
[esm-url]: https://github.com/stdlib-js/random-streams-improved-ziggurat/tree/esm
|
|
567
|
+
[branches-url]: https://github.com/stdlib-js/random-streams-improved-ziggurat/blob/main/branches.md
|
|
568
|
+
|
|
593
569
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/random-streams-improved-ziggurat/main/LICENSE
|
|
594
570
|
|
|
595
571
|
[stream]: https://nodejs.org/api/stream.html
|
|
@@ -602,14 +578,24 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
602
578
|
|
|
603
579
|
[@stdlib/array/uint32]: https://www.npmjs.com/package/@stdlib/array-uint32
|
|
604
580
|
|
|
605
|
-
[@stdlib/random/base/improved-ziggurat]: https://www.npmjs.com/package/@stdlib/random-base-improved-ziggurat
|
|
606
|
-
|
|
607
581
|
[@doornik:2005]: https://www.doornik.com/research/ziggurat.pdf
|
|
608
582
|
|
|
609
583
|
[@marsaglia:2000b]: http://dx.doi.org/10.18637/jss.v005.i08
|
|
610
584
|
|
|
611
585
|
[@marsaglia:1964b]: https://doi.org/10.1080/00401706.1964.10490150
|
|
612
586
|
|
|
587
|
+
<!-- <related-links> -->
|
|
588
|
+
|
|
589
|
+
[@stdlib/random/base/improved-ziggurat]: https://www.npmjs.com/package/@stdlib/random-base-improved-ziggurat
|
|
590
|
+
|
|
591
|
+
[@stdlib/random/iter/improved-ziggurat]: https://www.npmjs.com/package/@stdlib/random-iter-improved-ziggurat
|
|
592
|
+
|
|
593
|
+
[@stdlib/random/streams/box-muller]: https://www.npmjs.com/package/@stdlib/random-streams-box-muller
|
|
594
|
+
|
|
595
|
+
[@stdlib/random/streams/randn]: https://www.npmjs.com/package/@stdlib/random-streams-randn
|
|
596
|
+
|
|
597
|
+
<!-- </related-links> -->
|
|
598
|
+
|
|
613
599
|
</section>
|
|
614
600
|
|
|
615
601
|
<!-- /.links -->
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";var u=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var c=u(function(he,E){E.exports={objectMode:!1,encoding:null,sep:"\n",copy:!0,siter:1e308}});var l=u(function(ce,f){
|
|
2
|
+
var R=require('@stdlib/assert-is-plain-object/dist'),i=require('@stdlib/assert-has-own-property/dist'),T=require('@stdlib/assert-is-boolean/dist').isPrimitive,L=require('@stdlib/assert-is-nonnegative-number/dist').isPrimitive,v=require('@stdlib/assert-is-string/dist').isPrimitive,N=require('@stdlib/assert-is-positive-integer/dist').isPrimitive,P=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,s=require('@stdlib/error-tools-fmtprodmsg/dist');function k(r,e){return R(e)?i(e,"sep")&&(r.sep=e.sep,!v(r.sep))?new TypeError(s('0rJ2W',"sep",r.sep)):i(e,"objectMode")&&(r.objectMode=e.objectMode,!T(r.objectMode))?new TypeError(s('0rJ2o',"objectMode",r.objectMode)):i(e,"encoding")&&(r.encoding=e.encoding,!v(r.encoding)&&r.encoding!==null)?new TypeError(s('0rJ7n',"encoding",r.encoding)):i(e,"highWaterMark")&&(r.highWaterMark=e.highWaterMark,!L(r.highWaterMark))?new TypeError(s('0rJ4k',"highWaterMark",r.highWaterMark)):i(e,"iter")&&(r.iter=e.iter,!P(r.iter))?new TypeError(s('0rJ2t',"iter",r.iter)):i(e,"siter")&&(r.siter=e.siter,!N(r.siter))?new TypeError(s('0rJ3P',"siter",r.siter)):(i(e,"prng")&&(r.prng=e.prng),i(e,"seed")&&(r.seed=e.seed),i(e,"state")&&(r.state=e.state),i(e,"copy")&&(r.copy=e.copy),null):new TypeError(s('0rJ2V',e));}f.exports=k
|
|
3
|
+
});var b=u(function(ve,m){
|
|
4
|
+
var x=require("debug"),W=x("random:streams:improved-ziggurat");m.exports=W
|
|
5
|
+
});var g=u(function(fe,_){
|
|
6
|
+
var q=require("readable-stream").Readable,A=require('@stdlib/assert-is-error/dist'),G=require('@stdlib/object-assign/dist'),V=require('@stdlib/utils-inherit/dist'),p=require('@stdlib/utils-define-nonenumerable-property/dist'),n=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),d=require('@stdlib/utils-define-read-only-accessor/dist'),F=require('@stdlib/utils-define-read-write-accessor/dist'),I=require('@stdlib/random-base-improved-ziggurat/dist').factory,y=require('@stdlib/buffer-from-string/dist'),z=require('@stdlib/utils-next-tick/dist'),C=c(),J=l(),o=b();function B(){return this._prng.seed}function D(){return this._prng.seedLength}function U(){return this._prng.stateLength}function H(){return this._prng.byteLength}function K(){return this._prng.state}function Q(r){this._prng.state=r}function X(){var r,e;if(!this._destroyed)for(r=!0;r;){if(this._i+=1,this._i>this._iter)return o("Finished generating pseudorandom numbers."),this.push(null);e=this._prng(),o("Generated a new pseudorandom number. Value: %d. Iter: %d.",e,this._i),this._objectMode===!1&&(e=e.toString(),this._i===1?e=y(e):e=y(this._sep+e)),r=this.push(e),this._i%this._siter===0&&this.emit("state",this.state)}}function Y(r){var e;if(this._destroyed)return o("Attempted to destroy an already destroyed stream."),this;return e=this,this._destroyed=!0,z(a),this;function a(){r&&(o("Stream was destroyed due to an error. Error: %s.",A(r)?r.message:JSON.stringify(r)),e.emit("error",r)),o("Closing the stream..."),e.emit("close")}}function t(r){var e,a;if(!(this instanceof t))return arguments.length>0?new t(r):new t;if(e=G({},C),arguments.length>0&&(a=J(e,r),a))throw a;return o("Creating a readable stream configured with the following options: %s.",JSON.stringify(e)),q.call(this,e),p(this,"_destroyed",!1),n(this,"_objectMode",e.objectMode),n(this,"_sep",e.sep),n(this,"_iter",e.iter),n(this,"_siter",e.siter),p(this,"_i",0),n(this,"_prng",I(e)),n(this,"PRNG",this._prng.PRNG),this}V(t,q);d(t.prototype,"seed",B);d(t.prototype,"seedLength",D);F(t.prototype,"state",K,Q);d(t.prototype,"stateLength",U);d(t.prototype,"byteLength",H);n(t.prototype,"_read",X);n(t.prototype,"destroy",Y);_.exports=t
|
|
7
|
+
});var j=u(function(le,w){
|
|
8
|
+
var Z=require('@stdlib/assert-is-plain-object/dist'),$=require('@stdlib/object-assign/dist'),ee=require('@stdlib/error-tools-fmtprodmsg/dist'),re=g();function te(r){var e;if(arguments.length>0){if(e=r,!Z(e))throw new TypeError(ee('0rJ2V',e));e=$({},r)}else e={};return e.objectMode=!0,new re(e)}w.exports=te
|
|
9
|
+
});var O=u(function(me,M){
|
|
10
|
+
var ie=require('@stdlib/assert-is-plain-object/dist'),ne=require('@stdlib/object-assign/dist'),ae=require('@stdlib/error-tools-fmtprodmsg/dist'),se=g();function ue(r){var e;if(arguments.length>0){if(!ie(r))throw new TypeError(ae('0rJ2V',r));e=ne({},r)}else e={};return a;function a(){return new se(e)}}M.exports=ue
|
|
11
|
+
});var S=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),h=g(),oe=j(),de=O();S(h,"objectMode",oe);S(h,"factory",de);module.exports=h;
|
|
12
|
+
/** @license Apache-2.0 */
|
|
13
|
+
//# sourceMappingURL=index.js.map
|