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.
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.
To use as a general utility, install the CLI package globally
npm install -g @stdlib/random-streams-chisquare-cli
Usage: random-chisquare [options] <k> Options: -h, --help Print this message. -V, --version Print the package version. --sep sep Separator used to join streamed data. Default: '\n'. -n, --iter iterations Number of pseudorandom numbers. --seed seed Pseudorandom number generator seed. --state filepath Path to a file containing the pseudorandom number generator state. --snapshot filepath Output file path for saving the pseudorandom number generator state upon exit.
- In accordance with POSIX convention, a trailing newline is always appended to generated output prior to exit.
- Specifying a "snapshot" file path is useful when wanting to resume pseudorandom number generation due to, e.g., a downstream failure in an analysis pipeline. Before exiting, the process will store the pseudorandom number generator state in a file specified according to a provided file path. Upon loading a snapshot (state), the process will generate pseudorandom numbers starting from the loaded state, thus avoiding having to seed and replay an entire analysis.
$ random-chisquare 1.0 -n 10 --seed 1234
@stdlib/random-streams-chisquare: create a readable stream for generating pseudorandom numbers drawn from a chi-square distribution.
@stdlib/random-base/chisquare: Chi-square distributed pseudorandom numbers.
@stdlib/random-iter/chisquare: create an iterator for generating pseudorandom numbers drawn from a chi-square distribution.
Copyright © 2016-2023. The Stdlib Authors.