71 Commits

Author SHA1 Message Date
Diggory Hardy
0e626c7436
Cleaner README, remove MSRV shields (#1417) 2024-03-25 14:56:17 +00:00
Diggory Hardy
2eaf8545d4
Bump the MSRV to 1.61.0 (#1416) 2024-03-22 12:33:33 +00:00
Diggory Hardy
1015e709da
Prepare 0.9.0-alpha.1 (#1413) 2024-03-18 19:08:37 +00:00
Diggory Hardy
b1427c6447
Disable rand_pcg's dev dependency on rand (#1397)
The circular dependency prevents publishing
2024-02-18 17:32:29 +00:00
Diggory Hardy
5577003615
Update CHANGELOGs and prepare rand 0.9.0-alpha.0 (#1395)
Also: add pull-request template
2024-02-18 17:02:05 +00:00
Vinzent Steinberg
14d036c60c Add example for using rand (#1347) 2023-12-14 22:05:17 +01:00
Vinzent Steinberg
1cc3f881a1 Update changelog 2023-11-27 21:54:34 +01:00
Vinzent Steinberg
1924e120cc Fix doc test to work without rand and from_entropy 2023-11-27 21:52:23 +01:00
Vinzent Steinberg
d9a89c8f13 Add example for initializing a PCG RNG (#1347) 2023-10-30 21:24:34 +01:00
bjorn3
e42c385872
MSRV=1.60, use more permissive cfg on test
* Use cfg(panic = unwind) instead of a check for wasm32 to see if unwinding is supported

This allows the test to run on a future wasm target with exception support as
well as running the test suite with panic=abort on non-wasm targets.

* Bump MSRV to 1.60
2023-10-11 08:54:54 +01:00
Guillaume Gomez
176e73647a
Add --generate-link-to-definition option when building on docs.rs (#1327)
* Add `--generate-link-to-definition` option when building on docs.rs

* Fix documentation issues
2023-07-29 08:12:57 +01:00
Vinzent Steinberg
7d73990096
Make Uniform constructors return a result (#1229)
* Forbid unsafe code in crates without unsafe code

This helps tools like `cargo geiger`.

* Make `Uniform` constructors return a result

- This is a breaking change.
- The new error type had to be made public, otherwise `Uniform` could
  not be extended for user-defined types by implementing
  `UniformSampler`.
- `rand_distr` was updated accordingly.
- Also forbid unsafe code for crates where none is used.

Fixes #1195, #1211.

* Address review feedback
* Make `sample_single` return a `Result`
* Fix benchmarks
* Small fixes
* Update src/distributions/uniform.rs
2023-02-06 10:55:22 +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
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
Adam Reichold
6107f93e81 Apply the same copy-editing to the existing generators as was discussed for Lcg128CmDxsm64. 2021-12-06 13:35:29 +01:00
Adam Reichold
ece8e48905 Add Lcg128CmDxsm64 generator compatible with NumPy's PCG64DXSM. 2021-12-06 13:35:29 +01:00
Adam Reichold
b0d7833b55 Replace the open-coded fill_bytes_impl by rand_core::impls::fill_bytes_via_next. 2021-12-06 13:35:29 +01:00
Vinzent Steinberg
564055aed9 Remove notice by Apache License Authors for all other crates 2021-08-24 20:39:31 +02:00
Vinzent Steinberg
c60b7cd21b Remove special cases for emscripten
Because emscripten supports 128-bit integers now, we no longer have to
add special cases for it. In particular, we can now use ChaCha12 on all
platforms.
2021-07-08 16:29:02 +02:00
Dirk Stolle
277e5b0e9d fix some typos 2021-06-15 22:27:37 +02:00
Diggory Hardy
1bfc53d57f Update changelogs and bump version numbers 2021-06-14 10:04:59 +01:00
Vinzent Steinberg
9121d39732 Document dependencies between PCG streams
Fixes #907.
2021-05-07 18:33:06 -03:00
Mark Wong
57cd95999d Expand advancing tests to use multiple seeds 2021-04-22 16:32:08 -07:00
Mark Wong
c775705b88 Touch up changes around advancing feature
* Add additional comments on how to use the advance() function
* Use clone() for clarity instead of reusing a seed
* Compare the generator as a whole as opposed the next value in unit
  tests
2021-04-20 20:50:10 -07:00
Mark Wong
53b54b247e Fix Lcg64Xsh32 advancing test to use 32 bit generation functions 2021-04-19 14:12:23 -07:00
Mark Wong
f7960e9fb2 Revert "Delta needs to be doubled when advancing Lcg64Xsh32"
This reverts commit 624d24e8ae0043bfbd59c369e1741ab3bc848a64.
2021-04-19 14:00:18 -07:00
Mark Wong
624d24e8ae Delta needs to be doubled when advancing Lcg64Xsh32 2021-04-16 13:52:56 -07:00
Mark Wong
9017732011 Add tests for advancing PCG generators
A simple test to check the values after 20 steps.
2021-04-10 17:35:00 -07:00
Mark Wong
91d7699a69 Add an advance function to PCG generators
Based on the C implementations to advance the generator.
2021-04-04 09:48:43 -07:00
Diggory Hardy
1959b1adac Adjust homepage to point at the book 2020-12-15 10:13:17 +00:00
Diggory Hardy
e9adf451c5 Switch documentation links to docs.rs 2020-12-15 10:08:34 +00:00
Diggory Hardy
15aebf418f Prepare rand_pcg 0.3.0 2020-12-14 14:43:45 +00:00
Diggory Hardy
d95dbd2f93 Prepare rand_core 0.6.0 2020-12-14 14:43:45 +00:00
Diggory Hardy
0f53b56870 Update README files shields and doc 2020-12-13 11:00:07 +00:00
Diggory Hardy
8caa86b666 Cargo.toml: remove [badges] sections
According to the Cargo manifest, this section is not used
and the README should be used for build status.
2020-12-13 11:00:07 +00:00
Vinzent Steinberg
14ba1bbb4d Fix some clippy warnings
Also reenable some lints that no longer cause warnings.
2020-10-09 12:08:15 +02:00
Vinzent Steinberg
7555747c16 Bump MSRV to 1.36 2020-08-28 15:31:56 +02:00
Kaz Wesley
4b99567b56
impl PartialEq, Eq for rngs (#979)
Implements #974. As in #975, but defining equality such that the user is
not exposed to the fact that one logical state may have different
representations in an implementation-specific way.
2020-05-29 09:40:09 +01:00
Yannick Feld
bf8b5a98ac rand_pcg README.md Remove unnecessary [ 2020-04-29 13:58:01 +02:00
Diggory Hardy
3a5d5a8e7a Use rustfmt::skip for some cases
This does not include all cases of rejected reformatting;
only ones where rustfmt is not expected to do well.
2020-01-02 15:46:14 +00:00
Diggory Hardy
92e07018e0 rustfmt: expression spacing (on the line) 2020-01-02 15:46:14 +00:00
Diggory Hardy
fd872b66f1 rustfmt: arrays
(Several array reformattings were rejected.)
2020-01-02 15:46:14 +00:00
Diggory Hardy
363571540f rustfmt: method chaining 2020-01-02 15:46:14 +00:00
Diggory Hardy
4f1f0fce67 rustfmt: struct literals, if/for blocks 2020-01-02 15:46:14 +00:00
Diggory Hardy
ccb64dc0a0 rustfmt: attributes 2020-01-02 15:46:14 +00:00
Diggory Hardy
7a181deca6 rustfmt: initial attributes, mod and use statements 2020-01-02 15:46:14 +00:00
Diggory Hardy
88aa915c66 rustfmt: use, mod statements and initial attributes 2020-01-02 15:46:14 +00:00
Diggory Hardy
64045ff3f1 rand_pcg: doc fixes and extra links 2019-11-19 12:26:11 +00:00
Anthony Ramine
cfc68b5d09 Update rand_pcg to 0.2.1
This allows us to publish autocfg removal and bincode bump.
2019-10-22 17:26:51 +02:00
Diggory Hardy
33cd28b1c4 rand_pcg: bump bincode to 1.1.4 2019-09-20 21:20:53 +01:00