Expand description
Generates random choices based on the weight table of probabilities. It can be used to calculate each item’s probability of being picked up when picking a given amount of non-repetitive items, or to compare the speed of OS random source with that of the CSPRNG.
Structs§
- Configuration required by
Picker
. All members are public and are supposed to be modified by the user. - Generator of groups of random items of type
T
with different probabilities. According to the configuration, items in each group can be either repetitive or non-repetitive.
Enums§
- Possible errors returned by functions in this crate.
Functions§
- Convenience wrapper for exactly one picking operation.
- Prints the weight table to the standard output.
Type Aliases§
- Alias of
HashMap
. The weight value type is alwaysf64
.