Releases: rust-random/rand_distr
Releases · rust-random/rand_distr
0.5.1
What's Changed
- Fix missing import for
no_stdbuilds by @ralphtandetzky in #13
New Contributors
- @ralphtandetzky made their first contribution in #13
Full Changelog: 0.5.0...0.5.1
0.5.0
Dependencies and features
- Bump the MSRV to 1.61.0 (#1207, #1246, #1269, #1341, #1416); note that 1.60.0 may work for dependents when using
--ignore-rust-version - Update to
randv0.9.0 (#1558) - Rename feature
serde1toserde(#1477)
API changes
- Make distributions comparable with
PartialEq(#1218) Dirichletnow usesconstgenerics, which means that its size is required at compile time (#1292)- The
Dirichlet::new_with_sizeconstructor was removed (#1292) - Add
WeightedIndexTree(#1372, #1444) - Add
PertBuilderto allow specification ofmeanormode(#1452) - Rename
Zeta's parameteratos(#1466) - Mark
WeightError,PoissonError,BinomialErroras#[non_exhaustive](#1480) - Remove support for usage of
isizeas aWeightedAliasIndexweight (#1487) - Change parameter type of
Zipf::new:nis now floating-point (#1518)
API changes: renames
- Move
Slice->slice::Choose,EmptySlice->slice::Empty(#1548) - Rename trait
DistString->SampleString(#1548) - Rename
DistIter->Iter,DistMap->Map(#1548) - Move
{Weight, WeightError, WeightedIndex}->weighted::{Weight, Error, WeightedIndex}(#1548) - Move
weighted_alias::{AliasableWeight, WeightedAliasIndex}->weighted::{..}(#1548) - Move
weighted_tree::WeightedTreeIndex->weighted::WeightedTreeIndex(#1548)
Testing
- Add Kolmogorov Smirnov tests for distributions (#1494, #1504, #1525, #1530)
Fixes
- Fix Knuth's method so
Poissondoesn't return -1.0 for small lambda (#1284) - Fix
Poissondistribution instantiation so it return an error if lambda is infinite (#1291) - Fix Dirichlet sample for small alpha values to avoid NaN samples (#1209)
- Fix infinite loop in
Binomialdistribution (#1325) - Fix
Pertdistribution wheremodeis close to(min + max) / 2(#1452) - Fix panic in Binomial (#1484)
- Limit the maximal acceptable lambda for
Poissonto solve (#1312) (#1498) - Fix bug in
Hypergeometric, this is a Value-breaking change (#1510)
Other changes
- Remove unused fields from
Gamma,NormalInverseGaussianandZipfdistributions (#1184)
This breaks serialization compatibility with older versions. - Add plots for
rand_distrdistributions to documentation (#1434) - Move some of the computations in Binomial from
sampletonew(#1484) - Reimplement
Poisson's rejection method to improve performance and correct sampling inaccuracies for large lambda values, this is a Value-breaking change (#1560)