random-distributions-cli-0.1.0 is not a library.
random-distributions-cli
Command-line tool to generate samples of various random distributions
Usage
$ random-distributions-cli -n 5 normal 0 1
0.2691767185
-1.1783043912
0.5623772742
0.1078446497
0.2829313503
$ target/release/random-distributions-cli -n 3 uniform -- -1 1
0.0218074136
0.4381694923
-0.7817481855
$ random-distributions-cli --help
Usage: random-distributions-cli [-p <precision>] [-C] [-S <seed>] [-b <binary-format>] [-n <num-samples>] <command> [<args>]
Command-line tool to generate samples of various random distributions. Note that more single-value distributions that are mentioned in https://docs.rs/statrs/0.15.0/statrs/distribution/index.html are easy to add to the tool.
Options:
-p, --precision number of digits after decimal to print
-C, --cumulative add value of each sample to buffer
-S, --seed use specified seed instead for PRNG
-b, --binary-format
output as binary numbers of specified format instead of
text. Valid formats are f{32,64}{be,le}, {u,s}8,
{u,s}{16,32,64}{le,be}. Out of range values are
clamped to valid ranges
-n, --num-samples number of sampels to generate, instead of an infinite stream
--help display usage information
Commands:
uniform Uniform distribution
normal Normal, Gaussian distribution
cauchy Cauchy, Lorentz distribution - fat-tailed and continuous
triangular Triangular distribution - continuous
studentt Student-T distribution
stable General case of stable continuous distribution, generated by
CMS method. Note that this one is not checked by a
mathenatician, so don't rely on it to match other
implementation I used one hack about scaling to make it
match Cauchy and Normal distributions, but I am not sure if
it is correct.
empirical Discrete distribution that just endlessly randomly selects
one of specified values
categorical Discrete distribution that generates values according to
specified probabilities
Individual distributions may provide additional internal --help
messages.