statrs 0.4.0

Statistical computing library for Rust

This crate aims to be a functional port of the Math.NET Numerics Distribution package and in doing so providing the Rust numerical computing community with a robust, well-tested statistical distribution package. This crate also ports over some of the special statistical functions from Math.NET in so far as they are used in the computation of distribution values. This crate depends on the rand crate to provide RNG.

Example

The following example samples from a standard normal distribution

# extern crate rand;
# extern crate statrs;
use rand::StdRng;
use statrs::distribution::{Distribution, Normal};

# fn main() {
let mut r = rand::StdRng::new().unwrap();
let n = Normal::new(0.0, 1.0).unwrap();
for _ in 0..10 {
    print!("{}", n.sample::<StdRng>(&mut r));
}
# }