File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,24 @@ It is worth mentioning the [statrs] crate which provides similar functionality
20
20
along with various support functions, including PDF and CDF computation. In
21
21
contrast, this ` rand_distr ` crate focuses on sampling from distributions.
22
22
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
28
24
29
25
The floating point functions from ` num_traits ` and ` libm ` are used to support
30
26
` no_std ` environments and ensure reproducibility. If the floating point
31
27
functions from ` std ` are prefered, which may provide better accuracy and
32
28
performance but may produce different random values, the ` std_math ` feature
33
29
can be enabled.
34
30
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
36
41
37
42
- [ API documentation (master)] ( https://rust-random.github.io/rand/rand_distr )
38
43
- [ API documentation (docs.rs)] ( https://docs.rs/rand_distr )
You can’t perform that action at this time.
0 commit comments