Skip to content

Commit 0e515d7

Browse files
committed
Update rand_distr readme
1 parent 9bd8017 commit 0e515d7

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

rand_distr/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,24 @@ It is worth mentioning the [statrs] crate which provides similar functionality
2020
along with various support functions, including PDF and CDF computation. In
2121
contrast, this `rand_distr` crate focuses on sampling from distributions.
2222

23-
If the `std` default feature is enabled, `rand_distr` implements the `Error`
24-
trait for its error types.
25-
26-
The default `alloc` feature (which is implied by the `std` feature) is required
27-
for some distributions (in particular, `Dirichlet` and `WeightedAliasIndex`).
23+
## Portability and libm
2824

2925
The floating point functions from `num_traits` and `libm` are used to support
3026
`no_std` environments and ensure reproducibility. If the floating point
3127
functions from `std` are prefered, which may provide better accuracy and
3228
performance but may produce different random values, the `std_math` feature
3329
can be enabled.
3430

35-
Links:
31+
## Crate features
32+
33+
- `std` (enabled by default): `rand_distr` implements the `Error` trait for
34+
its error types. Implies `alloc` and `rand/std`.
35+
- `alloc` (enabled by default): required for some distributions when not using
36+
`std` (in particular, `Dirichlet` and `WeightedAliasIndex`).
37+
- `std_math`: see above on portability and libm
38+
- `serde1`: implement (de)seriaialization using `serde`
39+
40+
## Links
3641

3742
- [API documentation (master)](https://rust-random.github.io/rand/rand_distr)
3843
- [API documentation (docs.rs)](https://docs.rs/rand_distr)

0 commit comments

Comments
 (0)