Crate statrs[−][src]
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
use rand::distributions::Distribution; use statrs::distribution::Normal; let mut r = rand::thread_rng(); let n = Normal::new(0.0, 1.0).unwrap(); for _ in 0..10 { print!("{}", n.sample(&mut r)); }
Modules
consts | Defines mathematical expressions commonly used when computing distribution values as constants |
distribution | Defines common interfaces for interacting with statistical distributions and provides concrete implementations for a variety of distributions. |
euclid | Provides number theory utility functions |
function | Provides a host of special statistical functions (e.g. the beta function or the error function) |
generate | Provides utility functions for generating data sequences |
prec | Provides utility functions for working with floating point precision |
statistics | Provides traits for statistical computation |
Macros
assert_almost_eq |
Enums
StatsError | Enumeration of possible errors thrown within the |
Type Definitions
Result | Result type for the statrs library package that returns
either a result type |