Diggory Hardy
32343a6f37
Rearrange Cargo.toml
2021-08-17 09:55:53 +01:00
Diggory Hardy
e64df6631e
Alphanumeric: document usage with DistString trait
2021-08-17 09:51:53 +01:00
Arif Driessen
c831b8dd3b
Better random chars example
2021-08-17 09:49:34 +01:00
Vinzent Steinberg
067238f057
Remove rand_hc
( #1156 )
...
* Remove `rand_hc`
We no longer need it for `rand`, so it can be moved to the `rngs`
repository.
2021-08-05 14:59:07 +02:00
Vinzent Steinberg
b39e35fd84
Merge pull request #1136 from vks/zipf
...
rand_distr: Add Zipf distribution
2021-08-04 16:33:08 +02:00
Vinzent Steinberg
fe5a6e10d4
Zeta: Document cases where infinity is returned
2021-08-03 23:56:35 +02:00
Vinzent Steinberg
cf4b7e4671
Zeta: Fix infinite loop for small a
2021-08-02 23:34:14 +02:00
Vinzent Steinberg
72a63339b7
Zeta: Avoid division in rejection criterion
2021-07-30 14:29:04 +02:00
Vinzent Steinberg
a32cd08eb4
Zeta: Mention algorithm in doc comment
2021-07-30 13:21:21 +02:00
Vinzent Steinberg
e5aff9a10d
Zipf: Avoid division inside loop
2021-07-30 13:15:58 +02:00
Vinzent Steinberg
0f9243c4a6
Zipf: Add debug_assert for invariant
2021-07-28 19:12:58 +02:00
Vinzent Steinberg
b053683ee4
Zipf: Correctly calculate rejection ratio
2021-07-28 18:26:45 +02:00
Vinzent Steinberg
a746fd2369
Zipf: Fix inv_cdf
for s = 1
2021-07-28 18:23:03 +02:00
Vinzent Steinberg
e19349c0cf
Give credit for implementation details
2021-07-28 17:39:22 +02:00
Michael Rosenberg
cc13807149
Typo
2021-07-27 16:36:06 -04:00
Michael Rosenberg
475de9a0f6
Updated readme
2021-07-27 16:35:07 -04:00
Michael Rosenberg
6b0f550d41
Removed getrandom feature
2021-07-27 16:32:08 -04:00
Michael Rosenberg
c8f3bac0f7
Updated changelog
2021-07-27 16:16:45 -04:00
Vinzent Steinberg
2a33433247
Zeta: Replace likely impossible if with debug_assert
2021-07-27 21:59:21 +02:00
Vinzent Steinberg
85f55b278a
Zeta and Zipf: Improve docs
2021-07-27 21:59:09 +02:00
Michael Rosenberg
894cf45fad
Propagate std and getrandom features
2021-07-27 15:52:23 -04:00
fossdd
a49e4ad730
Remove notice by Apache License Authors
...
The notice that we can add a license notice before every file can be ignored, as rand already has a own copyright notice.
2021-07-26 09:17:42 +00:00
Diggory Hardy
81b8a7542b
Merge pull request #1150 from rodrimati1992/master
...
Added docs about rand's use of const generics
2021-07-26 07:40:59 +01:00
rodrimati1992
d4256fcc6d
Added min_const_gen feature to README
2021-07-25 18:53:19 -03:00
rodrimati1992
a36047f0dc
Documented needed crate feature
2021-07-25 18:44:25 -03:00
rodrimati1992
82b819ab67
Documented needed crate feature
2021-07-25 18:42:43 -03:00
Diggory Hardy
46e11cd8e5
Merge pull request #1142 from vks/emscripten-i128
...
Remove special cases for emscripten
2021-07-22 19:51:27 +01:00
Vinzent Steinberg
1145ba0200
Update CHANGELOG.md
2021-07-13 15:23:39 +02:00
Patrick Chieppe
fb6390f9d3
Fix build on non-32/64-bit architectures ( #1144 )
...
* Impl WideningMultiply for 16-bit pointers
* Add AVR CI test job
2021-07-13 15:18:57 +02:00
Diggory Hardy
52407e7ccc
Merge pull request #1141 from dhardy/work
...
Add serde1 feature for rand_distr
2021-07-09 13:27:18 +01:00
Diggory Hardy
af751dfeac
Merge branch 'master' into work
2021-07-09 13:27:09 +01:00
Diggory Hardy
564a504d59
Update changelog
2021-07-09 09:33:10 +01: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
Diggory Hardy
0e515d7adc
Update rand_distr readme
2021-07-08 15:16:53 +01:00
Diggory Hardy
9bd8017e20
impl serde for rand_distr::WeightedAliasIndex; fix bounds for Uniform
2021-07-08 15:10:46 +01:00
Diggory Hardy
b9f0c54a2c
rand_distr: derive serde support (easy cases)
2021-07-08 15:10:39 +01:00
Diggory Hardy
b27c38372d
rand_distr: add serde1 feature
2021-07-08 15:10:31 +01:00
Vinzent Steinberg
14d55f8664
Group Zeta
and Zipf
with rate-related distributions
...
Arguably, the Zipf distribution is related to the Pareto distribution
[1].
[1] https://en.wikipedia.org/wiki/Zipf's_law#Related_laws
2021-06-16 02:53:10 +02:00
Vinzent Steinberg
3cccc64a46
Zeta: Inline distribution methods
2021-06-16 02:50:58 +02:00
Vinzent Steinberg
ccaa4de990
Zipf: Update benchmarks
2021-06-16 02:49:18 +02:00
Vinzent Steinberg
f514fd68ba
Zipf: Simplify calculation of ratio
...
This should improve performance slightly.
2021-06-16 02:40:36 +02:00
Vinzent Steinberg
139e898f06
Zipf: Simplify trait bounds
2021-06-16 02:40:35 +02:00
Vinzent Steinberg
4d67af2604
Zipf: Mention that rounding may occur
2021-06-16 02:40:35 +02:00
Vinzent Steinberg
6270248f59
Zipf: Fix s = 1
special case
...
Also inline the distribution methods.
2021-06-16 02:40:35 +02:00
Vinzent Steinberg
a07b3218fa
rand_distr: Add Zipf (not zeta) distribution
2021-06-16 02:40:33 +02:00
Vinzent Steinberg
b06c2f61af
Don't claim Zeta
follows Zipf's law
...
It seems like this is not true [1], at least not with the same exponent.
[1] https://en.wikipedia.org/wiki/Zeta_distribution
2021-06-16 02:40:02 +02:00
Vinzent Steinberg
6c27184f22
Rename Zipf
to Zeta
...
This follows the naming convention on Wikipedia.
2021-06-16 02:39:59 +02:00
Vinzent Steinberg
c2ecf1babb
Fix value stability tests
2021-06-16 02:39:32 +02:00
Vinzent Steinberg
718e71b826
Zipf: Add benchmark
2021-06-16 02:39:32 +02:00
Vinzent Steinberg
a57247d9a2
Zipf: Use OpenClosed01
2021-06-16 02:39:32 +02:00