dnorm 0.1.0

Sampling exactly from the normal distribution
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented1 out of 2 items with examples
  • Size
  • Source code size: 9.78 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.48 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • azzaouit

Crates.io Version

This crate implements the Distribution trait for the discrete normal distribution.

Usage

use dnorm::DiscreteNormal;
use rand::distributions::Distribution;

let d = DiscreteNormal::new(0.0, 3.0);
let v = d.sample(&mut rand::thread_rng());
println!("{} is from a discrete N(0, 9) distribution", v)

Acknowledgements

Karney, C. (2016). Sampling Exactly from the Normal Distribution. ACM Transactions on Mathematical Software, 42(1), 1–14.