Skip to content

rust crate for random variate generation

License

Notifications You must be signed in to change notification settings

georgbramm/dist_variate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

randvariate

This code implements the H2PEC algorithm in rust. It is based on the following work:

VORATAS KACHITVICHYANUKUL AND BRUCE SCHMEISER
"COMPUTER GENERATION OF HYPERGEOMETRIC RANDOM VARIATES,"
JOURNAL OF STATISTICAL COMPUTATION AND SIMULATION,
22(1985), 2, 1985, 127-145.

usage

extern crate dist_variate;
extern crate rand;

use dist_variate::hgd::h2pec;


let mut rng = rand::thread_rng();
let jx = h2pec(100, 10000, 20000, &rng);

// jx will be the number of white balls drawn

About

rust crate for random variate generation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%