3273 Commits

Author SHA1 Message Date
Paul Crowley
e97b5b6887
Simpler and faster implementation of Floyd's F2 (#1277)
The previous implementation used either `Vec::insert` or a second
F-Y shuffling phase to achieve fair random order. Instead, use the
random numbers already drawn to achieve a fair shuffle.
2023-01-01 09:49:32 +00:00
TheIronBorn
b9e7d84c3b
use partition_point in WeightedIndex (#1276)
* use partition_point in WeightedIndex

* fix partition_point

* fix
2022-12-22 10:54:41 +00:00
Diggory Hardy
fbd95860b4
Add Criterion as dev-dependency, fix CI for MSRV and minimal-versions (#1275)
* Add criterion as dev-dependency

* CI[minimal-versions]: require regex 1.5.1
2022-12-11 17:47:51 +00:00
Alex
81d7dc7264
build: harden test.yml permissions (#1274)
Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-12-09 09:50:09 +00:00
Alex Saveau
0dddc2c559
Add read_adapter to avoid dynamic dispatch (#1267)
* Add read_adapter to avoid dynamic dispatch

* Get rid of the dyn Read impl since we can't deprecate it
2022-12-07 10:18:04 +00:00
Diggory Hardy
50b9a44741
fill_via_chunks: mutate src on BE (small optimisation) (#1182)
* fill_via_chunks: mutate src on BE (small optimisation)

* Add doc to fill_via_chunks
2022-12-07 09:47:45 +00:00
Diggory Hardy
19169cbce9
Bump MSRV to 1.56 (Edition 2021) (#1269)
* Bump MSRV to 1.56 (Edition 2021)

* Apply Clippy suggestions

* Bump edition and add rust-version field to Cargo.toml

* CI AVR test: unpin nightly rust version

* Disable AVR test

* Bump crate version numbers for a breaking release
2022-12-06 19:01:10 +00:00
Diggory Hardy
7aa25d577e
gh-pages action: add id-token write permission (#1265)
* gh-pages action: add id-token write permission

* gh-pages action: add environment
2022-11-14 16:41:49 +00:00
ironhaven
0aca9028f2
SmallRng uses wrong seed_from_u64 implementation (#1203)
* Forward inner seed_from_u64 implmentation for SmallRng

* increase tolerance of sparkline tests
2022-11-14 12:08:30 +00:00
Frank Steffahn
21131af61d
Remove redundant AsRef/AsMut bounds (#1207) 2022-11-14 11:37:49 +00:00
Yaron Sheffer
8339afc7ee
Fix typo (#1264) 2022-11-14 11:05:54 +00:00
Diggory Hardy
9720f110a6
Update GitHub Actions (#1263)
* examples/rayon-monte-carlo.rs: remove execute bit of file metadata

* Document in README that MSRV is 1.51.0

This was changed in #1246

* Update GitHub Actions
2022-11-10 15:36:40 +00:00
TheIronBorn
387dd644a2
fix outdated choose_multiple_weighted docs (#1237) 2022-11-09 14:50:09 +00:00
Ralf Jung
23f8b2986e
clarify shuffle docs (#1259) 2022-10-11 09:07:15 +01:00
ISibboI
8d70f5017f
Clarify documentation of choose_weighted(_mut) mentioning accurate behavior with floats (#1245)
* Fix the documentation for `choose_weighted(_mut)` as discussed in #1243.

* Mention that elements of zero weight are handled as expected by `WeightedIndex` as discussed in #1243.

Additionally fix some minor issues.

* Let the second example of `WeightedIndex` use floats to stress that they are handled correctly for the zero case.

* Manually indent doc comments.
2022-10-10 14:40:37 +01:00
Diggory Hardy
766c7eccd7
Doc: improve random, thread_rng, ThreadRng docs (#1257)
* Use a custom Debug impl for ThreadRng

* Adjust documentation of random, thread_rng, ThreadRng

* Fix no-std build

* Compatibility with older rustc
2022-09-30 09:48:10 +01:00
Alex Touchet
2b4f00add7
Update listed rand_core version number (#1254) 2022-09-16 07:41:28 +01:00
Diggory Hardy
89a1336b93
rand_core: update CHANGELOG for 0.6.4 (#1253) 2022-09-15 14:23:08 +01:00
TheIronBorn
b73640705d
Merge pull request #1246 from rust-random/work6
Bump MSRV to 1.51.0
2022-08-14 14:14:52 -07:00
Diggory Hardy
fbf06ff919 Optimized path of sample_efraimidis_spirakis is stable
This no longer requires nightly
2022-08-14 09:00:20 +01:00
Diggory Hardy
6951164ec6 Bump MSRV to 1.51.0: support const generics by default 2022-08-14 08:59:24 +01:00
Diggory Hardy
db80c40c4b Bump MSRV to 1.38.0: fixes crossbeam-utils dev-dependency 2022-08-14 08:59:24 +01:00
Pyry Kontio
2569e9d653
Mention disabling getrandom for wasm32-unknown-unknown in README (#1250) 2022-08-14 08:59:12 +01:00
TheIronBorn
9dd97b41c8
Merge pull request #1247 from rust-random/TheIronBorn-patch-1
optimize simd widening mul
2022-08-12 23:22:38 -07:00
TheIronBorn
d60ab387bf
optimize simd wmul 2022-08-11 05:45:51 +00:00
TheIronBorn
2c16a920cf
Merge pull request #1239 from TheIronBorn/std-simd
switch to std::simd, expand SIMD & docs
2022-08-10 11:56:46 -07:00
TheIronBorn
949d70f6a5 fix doc test 2022-08-07 17:42:24 -07:00
TheIronBorn
2fab15dcd7 fix stdsimd, add mask opt notes 2022-08-07 17:22:19 -07:00
TheIronBorn
1d55a97304
Merge pull request #1240 from TheIronBorn/patch-13
small deterministic example update
2022-08-04 13:54:38 -07:00
TheIronBorn
f89f15fc1f
fix doc link 2022-08-04 20:42:35 +00:00
TheIronBorn
d4b8748004 fix simd ints, clarify mask behavior 2022-07-11 11:29:13 -07:00
TheIronBorn
599d7f8f6d switch to std::simd, expand SIMD stuff & docs
move __m128i to stable, expand documentation, add SIMD to Bernoulli, add maskNxM, add __m512i

genericize simd uniform int

remove some debug stuff

remove bernoulli

foo

foo
2022-07-09 11:03:38 -07:00
TheIronBorn
89d7e4e184
another typo 2022-07-09 03:26:38 +00:00
TheIronBorn
1f99bb72dc
assert deterministic 2022-07-08 19:36:21 +00:00
TheIronBorn
6112c84365
small deterministic example update 2022-07-07 18:58:36 +00:00
masonk
330efe9d42
Deterministic Rayon monte carlo example (#1236)
* Deterministic Rayon monte carlo

* Update deterministic mt with a batching example

* discuss determinism in the context of rayon + rand

* reword the discussion

Co-authored-by: Mason Kramer <mason@masonkramer.net>
2022-07-07 08:20:11 +01:00
Chris Beck
3543f4b025
Make CryptoRngCore trait imply CryptoRng as well (#1230) 2022-05-19 17:55:31 +01:00
Vinzent Steinberg
f0f15b5ece
Merge pull request #1184 from vks/remove-unused-fields
Remove unused fields
2022-04-21 18:53:58 +02:00
Vinzent Steinberg
367cf50566
Merge pull request #1228 from cuishuang/master
fix typo
2022-04-20 22:49:28 +02:00
cuishuang
13193fcb8b fix typo
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-04-20 10:03:17 +08:00
Vinzent Steinberg
5f0d3a10a9 rand_distr: Remove unused fields
This breaks serialization compatibility with older versions.
2022-03-30 00:08:05 +02:00
Ralf Jung
a8474f7932
update Miri CI config (#1223) 2022-03-09 07:34:13 +00:00
Diggory Hardy
546acdc851
README: bump rand version 2022-02-14 08:38:55 +00:00
Diggory Hardy
937320cbfe
Update CHANGELOG for 0.8.5 (#1221) 2022-02-14 08:37:01 +00:00
Diggory Hardy
2924af688d
Merge pull request #1183 from vks/fill-float-doc
Mention that `Fill` supports floats
2022-02-11 14:29:28 +00:00
Diggory Hardy
dbbc1bf317
Merge pull request #1218 from Will-Low/master
Making distributions comparable by deriving PartialEq
2022-02-11 14:26:03 +00:00
Will Springer
9f20df04d8 Making distributions comparable by deriving PartialEq. Tests included 2022-02-10 19:36:42 -08:00
Vinzent Steinberg
a407bdfa45
Merge pull request #1216 from rust-random/work5
Update to packed_simd_2 0.3.7
2022-02-08 20:38:58 +01:00
Diggory Hardy
d3ca11b0bc Update to packed_simd_2 0.3.7 2022-02-08 09:33:33 +00:00
Diggory Hardy
fa04c15d0b
Merge pull request #1215 from Lantern-chat/master
Remove unused `slice_partition_at_index` feature
2022-02-07 09:44:37 +00:00