Diggory Hardy
19897e53c1
sample_indices: always shuffle. Floyd's alg: optimise.
2018-07-30 11:02:06 +01:00
Diggory Hardy
805022c096
sample_indices: update model parameters
...
This accounts for the "cache" method being replaced by
rejection sampling and now using usize again.
2018-07-30 11:02:06 +01:00
Diggory Hardy
fb64cf26f7
sample_indices: add new seq::index module for index sampling
2018-07-30 11:02:06 +01:00
Diggory Hardy
91f0af2504
sample_indices: rename Indices → IndexVec; some revisions
2018-07-30 11:02:06 +01:00
Diggory Hardy
d624e840ba
sample_indices_cache: use rejection sampling instead
2018-07-30 11:02:06 +01:00
Diggory Hardy
5fc1da8d8c
sample_indices: also support usize internally
2018-07-30 11:02:06 +01:00
Diggory Hardy
59d0823a78
sample_indices: abstract over return type
...
This is to allow use of u32 or usize internally
2018-07-30 11:02:06 +01:00
Diggory Hardy
c95f8969d3
sample_indices: use f32 in heuristics and add short-cut
...
Motivation: don't have to worry about overflow whichever index type is used.
Appears to slightly improve some benchmarks, no affect on others.
2018-07-30 11:01:57 +01:00
Diggory Hardy
98889f21bf
sample_indices: update selection heuristics
...
Update with new benchmark data from `u32` impls of Floyd's and cached
algorithms (inplace alg already used benchmarks from `u32` impl).
Update Floyd's with a balanced model adequate for both shuffled
and unshuffled versions.
2018-07-30 11:01:57 +01:00
Diggory Hardy
d4da64e272
sample_indices: add 'shuffled' parameter
2018-07-30 11:01:57 +01:00
Diggory Hardy
2f5a03a7f0
sample_indices: use u32 internally only
...
(controversial)
2018-07-30 11:01:57 +01:00
Diggory Hardy
949833ddd6
sample_indices: add Floyd's algorithm and update selection logic
2018-07-30 11:01:57 +01:00
Diggory Hardy
28d4949006
sample_indices: refactor; switch _inplaces to u32 only
...
The sample_indices_inplace algorithm is inappropriate for large numbers
2018-07-30 11:01:57 +01:00
Diggory Hardy
647371e8cd
sample_indices: revise benchmarks (pre-optimisation)
2018-07-30 11:01:57 +01:00
Paul Dicker
d8bea3a304
Merge pull request #563 from pitdicker/travis
...
Extend CI configuration
2018-07-27 22:05:13 +02:00
Paul Dicker
9d2ef95449
Merge pull request #542 from TheIronBorn/patch-5
...
fix SIMD integer endian
2018-07-27 19:14:36 +02:00
Paul Dicker
0bbc908e2a
Extend CI configuration
2018-07-27 19:05:38 +02:00
Vinzent Steinberg
c4cbb558fd
Add uniformity test for unit sphere and circle
...
This introduces an external dev-dependency on the `average` crate.
2018-07-27 15:15:54 +01:00
Vinzent Steinberg
96f43ed79c
Implement sampling from the unit circle
2018-07-27 15:15:54 +01:00
Vinzent Steinberg
c7a76b487e
Implement sampling from the unit sphere
...
This uses a method by Marsaglia (1972), which was found to be the
fastest of the methods given by [MathWorld].
[MathWorld]: http://mathworld.wolfram.com/SpherePointPicking.html
2018-07-27 15:15:54 +01:00
Vinzent Steinberg
ba3d27313f
Document simd_support feature
2018-07-27 13:50:40 +01:00
Vinzent Steinberg
a7f8f348f6
Implement From<RangeInclusive> for Uniform
...
Fixes #556 .
2018-07-27 13:50:40 +01:00
Paul Dicker
149c8b3a96
Depend on packed_simd for simd support
2018-07-27 12:06:14 +01:00
Diggory Hardy
11d6386890
Use real libcore instead of renamed libstd
2018-07-26 11:43:00 +01:00
Diggory Hardy
f8fd39d713
Merge pull request #557 from vks/xorshift-crate
...
Move `XorShiftRng` to its own crate
2018-07-24 13:46:39 +01:00
Vinzent Steinberg
b846c30c0a
Prefer SmallRng in benchmarks
2018-07-24 13:35:37 +02:00
Vinzent Steinberg
d2e7378adc
Simplify attributes
2018-07-24 13:25:08 +02:00
Vinzent Steinberg
cb275bc7e2
Fix serde tests
2018-07-23 13:08:56 +02:00
Diggory Hardy
686ba1469b
Merge pull request #544 from dhardy/doc
...
Doc and policies
2018-07-23 08:21:23 +01:00
Paul Dicker
29a9d1df58
Don't add std feature to rand_isaac and rand_xorshift
2018-07-20 20:07:48 +02:00
Vinzent Steinberg
e7b17ddce3
The rand crate does not depend on serde or bincode anymore
2018-07-20 16:25:56 +02:00
Vinzent Steinberg
ecd18674a4
Enable more CI tests
...
Before, there Serde tests where not running.
2018-07-20 16:17:34 +02:00
Vinzent Steinberg
dac6227596
rand_xorshift: Add README
2018-07-20 15:45:08 +02:00
Vinzent Steinberg
2a658d9fe4
Fix serde tests for rand_isaac and rand_xorshift
2018-07-20 15:44:15 +02:00
Paul Dicker
d162a5ef3c
Merge pull request #562 from pitdicker/wasm-bindgen-0.2.12
...
Update to wasm-bindgen 0.2.12
2018-07-20 07:44:00 +02:00
Paul Dicker
379ee2e6b4
Update to wasm-bindgen 0.2.12
2018-07-20 07:28:16 +02:00
Paul Dicker
01595282cf
Merge pull request #559 from pitdicker/fix_wasm_bindgen
...
Fix wasm-bindgen feature
2018-07-18 20:15:56 +02:00
Paul Dicker
d148bf5eca
Fix wasm-bindgen feature
2018-07-18 19:26:13 +02:00
Vinzent Steinberg
a3ac8d3a6a
Fix compilation warning with serde
2018-07-18 15:27:04 +02:00
Vinzent Steinberg
ecc6e66020
Fix broken links in docs
2018-07-18 15:19:52 +02:00
Vinzent Steinberg
2847c8af0d
Fix deprecation warnings in benchmarks
2018-07-18 10:36:07 +02:00
Vinzent Steinberg
9b069fe2ea
Fix benchmarks
2018-07-18 10:34:23 +02:00
Vinzent Steinberg
2cf9acb44e
Make sure XorShiftRng is deprecated
2018-07-18 10:27:45 +02:00
Vinzent Steinberg
a385938e40
Use keywords consistent with other Rand crates
2018-07-18 10:14:59 +02:00
Vinzent Steinberg
a253a80f76
Move XorShiftRng to its own crate
...
Also recommend `StdRng` rather than the deprecated `IsaacRng`.
2018-07-16 16:13:22 +02:00
Diggory Hardy
d625b18083
Fix deprecation warning in benches/generators.rs
2018-07-16 11:30:55 +01:00
Diggory Hardy
1a98577340
Merge pull request #551 from dhardy/isaac
...
Move ISAAC generators to their own crate
2018-07-16 10:35:41 +01:00
Diggory Hardy
2aabe7839c
Move ISAAC generators to their own crate
2018-07-16 09:18:34 +01:00
Diggory Hardy
b9cc58187b
Merge pull request #548 from sicking/mods
...
Hide modules that don't need to be publicly exported
2018-07-12 18:14:03 +01:00
Jonas Sicking
dd37c58c1c
Hide modules whose distributions we're exposing directly throguh rand::distributions. Also move a couple of distribution helper functions into utils.rs.
2018-07-12 08:22:29 -07:00