diff options
| author | bors <bors@rust-lang.org> | 2013-10-23 08:31:21 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-10-23 08:31:21 -0700 |
| commit | a4ec8af4c549bd806522826b756e18fbf0b5c47b (patch) | |
| tree | 94b419a959409c8616e95645aefe4f73cd619294 /src/rt/sync/rust_thread.cpp | |
| parent | 5de50a3f7135329d862c9265f5749ab7de865873 (diff) | |
| parent | 0bba73c0d156df8f22c64ef4f4c50910fe31cf31 (diff) | |
| download | rust-a4ec8af4c549bd806522826b756e18fbf0b5c47b.tar.gz rust-a4ec8af4c549bd806522826b756e18fbf0b5c47b.zip | |
auto merge of #9810 : huonw/rust/rand3, r=alexcrichton
- Adds the `Sample` and `IndependentSample` traits for generating numbers where there are parameters (e.g. a list of elements to draw from, or the mean/variance of a normal distribution). The former takes `&mut self` and the latter takes `&self` (this is the only difference). - Adds proper `Normal` and `Exp`-onential distributions - Adds `Range` which generates `[lo, hi)` generically & properly (via a new trait) replacing the incorrect behaviour of `Rng.gen_integer_range` (this has become `Rng.gen_range` for convenience, it's far more efficient to use `Range` itself) - Move the `Weighted` struct from `std::rand` to `std::rand::distributions` & improve it - optimisations and docs
Diffstat (limited to 'src/rt/sync/rust_thread.cpp')
0 files changed, 0 insertions, 0 deletions
