Skip to content

Commit

Permalink
Prepare 0.9.0 release (rust-random#1558)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy authored Jan 27, 2025
1 parent 5b0bc14 commit addaf7a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 37 deletions.
54 changes: 21 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0-beta.3] - 2025-01-03
- Bump `rand` version (#1547)
## [0.5.0] - 2025-01-27

### 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 `rand` v0.9.0 (#1558)
- Rename feature `serde1` to `serde` (#1477)

### API changes
- Make distributions comparable with `PartialEq` (#1218)
- `Dirichlet` now uses `const` generics, which means that its size is required at compile time (#1292)
- The `Dirichlet::new_with_size` constructor was removed (#1292)
- Add `WeightedIndexTree` (#1372, #1444)
- Add `PertBuilder` to allow specification of `mean` or `mode` (#1452)
- Rename `Zeta`'s parameter `a` to `s` (#1466)
- Mark `WeightError`, `PoissonError`, `BinomialError` as `#[non_exhaustive]` (#1480)
- Remove support for usage of `isize` as a `WeightedAliasIndex` weight (#1487)
- Change parameter type of `Zipf::new`: `n` is 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)

## [0.5.0-beta.2] - 2024-11-30
- Bump `rand` version

## [0.5.0-beta.1] - 2024-11-27
- Fix docs.rs build (#1539)

## [0.5.0-beta.0] - 2024-11-25
This is a pre-release. To depend on this version, use `rand = "=0.9.0-beta.0"` to prevent automatic updates (which can be expected to include breaking changes).

### Compilation options
- Target `rand` version `0.9.0-beta.0`
- 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`
- The `serde1` feature has been renamed `serde` (#1477)

### Testing
- Add Kolmogorov Smirnov tests for distributions (#1494, #1504, #1525, #1530)

Expand All @@ -35,31 +38,16 @@ This is a pre-release. To depend on this version, use `rand = "=0.9.0-beta.0"` t
- Fix `Poisson` distribution 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 `Binomial` distribution (#1325)
- Fix `Pert` distribution where `mode` is close to `(min + max) / 2` (#1452)
- Fix panic in Binomial (#1484)
- Limit the maximal acceptable lambda for `Poisson` to solve (#1312) (#1498)
- Fix bug in `Hypergeometric`, this is a Value-breaking change (#1510)

### Additions
- Make distributions comparable with `PartialEq` (#1218)
- Add `WeightedIndexTree` (#1372, #1444)

### Changes
### Other changes
- Remove unused fields from `Gamma`, `NormalInverseGaussian` and `Zipf` distributions (#1184)
This breaks serialization compatibility with older versions.
- `Dirichlet` now uses `const` generics, which means that its size is required at compile time (#1292)
- The `Dirichlet::new_with_size` constructor was removed (#1292)
- Add `PertBuilder`, fix case where mode ≅ mean (#1452)
- Rename `Zeta`'s parameter `a` to `s` (#1466)
- Mark `WeightError`, `PoissonError`, `BinomialError` as `#[non_exhaustive]` (#1480)
- Remove support for usage of `isize` as a `WeightedAliasIndex` weight (#1487)
- Change parameter type of `Zipf::new`: `n` is now floating-point (#1518)

### Optimizations
- Move some of the computations in Binomial from `sample` to `new` (#1484)

### Documentation
- Add plots for `rand_distr` distributions to documentation (#1434)
- Move some of the computations in Binomial from `sample` to `new` (#1484)

## [0.4.3] - 2021-12-30
- Fix `no_std` build (#1208)
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_distr"
version = "0.5.0-beta.3"
version = "0.5.0"
authors = ["The Rand Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down Expand Up @@ -33,15 +33,15 @@ std_math = ["num-traits/std"]
serde = ["dep:serde", "dep:serde_with", "rand/serde"]

[dependencies]
rand = { path = "..", version = "=0.9.0-beta.3", default-features = false }
rand = { path = "..", version = "0.9.0", default-features = false }
num-traits = { version = "0.2", default-features = false, features = ["libm"] }
serde = { version = "1.0.103", features = ["derive"], optional = true }
serde_with = { version = ">= 3.0, <= 3.11", optional = true }

[dev-dependencies]
rand_pcg = { version = "=0.9.0-beta.1", path = "../rand_pcg" }
rand_pcg = { version = "0.9.0", path = "../rand_pcg" }
# For inline examples
rand = { path = "..", version = "=0.9.0-beta.3", features = ["small_rng"] }
rand = { path = "..", version = "0.9.0", features = ["small_rng"] }
# Histogram implementation for testing uniformity
average = { version = "0.15", features = [ "std" ] }
# Special functions for testing distributions
Expand Down

0 comments on commit addaf7a

Please sign in to comment.