forked from rust-random/rand
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from rust-random:master #10
Open
pull
wants to merge
744
commits into
mesalock-linux:master
Choose a base branch
from
rust-random:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dingelish
force-pushed
the
master
branch
2 times, most recently
from
January 26, 2020 06:10
635ce54
to
e7e72f1
Compare
The current example to implement `SampleUniform` for custom types is incorrect. It mistakenly forwards the implementation of `UniformSampler::new_inclusive` to `UniformSampler::new`.
rand: fix incorrect example in Uniform
…ed for Lcg128CmDxsm64.
Add Lcg128CmDxsm64 generator compatible with NumPy's PCG64DXSM
Generating Dirichlet samples using the method based on samples from the gamma distribution can result in samples being nan if all the values in alpha are sufficiently small. The fix is to instead use the method based on the marginal distributions being the beta distribution (i.e. the "stick breaking" method) when all values in alpha are small.
rand_distr: fix no_std build
Remove unused `slice_partition_at_index` feature
Update to packed_simd_2 0.3.7
Making distributions comparable by deriving PartialEq
Mention that `Fill` supports floats
This breaks serialization compatibility with older versions.
Signed-off-by: cuishuang <[email protected]>
Enhance Kolmogorov–Smirnov Test Coverage for Various Distributions
Closes #1358 by documenting what Rand is not. Co-authored-by: Dan <[email protected]>
Adds random_iter, random_range, random_bool, random_ratio, fill. See also #989, #1503. Co-authored-by: Diggory Hardy <[email protected]>
Adds new non-publishing distr_test crate
The `rng` parameter seems redundant in `ReseedingRng::new` (aside from the type specification).
- Extra testing for weighted sampling - Fix IndexedRandom::choose_multiple_weighted with very small keys - Use A-ExpJ algorithm with BinaryHeap for better performance with large length / amount
- Update version numbers - Update CHANGELOGs - Add an extra benchmark
- Move `Slice` -> `slice::Choose`, `EmptySlice` -> `slice::Empty` - Rename trait `DistString` -> `SampleString` - Rename `DistIter` -> `Iter`, `DistMap` -> `Map` - Move `{Weight, WeightError, WeightedIndex}` -> `weighted::{Weight, Error, WeightedIndex}` - Move `weighted_alias::{AliasableWeight, WeightedAliasIndex}` -> `weighted::{..}` - Move `weighted_tree::WeightedTreeIndex` -> `weighted::WeightedTreeIndex`
- [x] Added a `CHANGELOG.md` entry # Summary As discussed in #1515, this PR replaces the implementation of `poisson::RejectionMethod` with a new algorithm based on the [paper ](https://dl.acm.org/doi/10.1145/355993.355997). # Motivation The new implementation offers improved performance and maintains better sampling distribution, especially for extreme values of lambda (> 1e9). # Details In terms of performance, here are the benchmarks I ran, with the current implementation as the baseline: ```text poisson/100 time: [45.5242 cycles 45.6734 cycles 45.8337 cycles] change: [-86.572% -86.507% -86.438%] (p = 0.00 < 0.05) Performance has improved. Found 5 outliers among 100 measurements (5.00%) 2 (2.00%) low mild 2 (2.00%) high mild 1 (1.00%) high severe poisson/variable time: [5494.6626 cycles 5508.2882 cycles 5523.2298 cycles] thrpt: [5523.2298 cycles/100 5508.2882 cycles/100 5494.6626 cycles/100] change: time: [-76.728% -76.573% -76.430%] (p = 0.00 < 0.05) thrpt: [+324.27% +326.85% +329.69%] Performance has improved. Found 5 outliers among 100 measurements (5.00%) 1 (1.00%) low mild 3 (3.00%) high mild 1 (1.00%) high severe ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )