dnorm

Crates.iodnorm
lib.rsdnorm
version0.1.0
sourcesrc
created_at2024-03-17 06:51:05.258688
updated_at2024-03-17 06:51:05.258688
descriptionSampling exactly from the normal distribution
homepage
repositoryhttps://github.com/azzaouit/dnorm
max_upload_size
id1176264
size6,706
(azzaouit)

documentation

README

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.

Commit count: 0

cargo fmt