API Reference weighted_random v#1.0.0-rc.1

Copy Markdown View Source

Modules

WeightedRandom.Backend offers a contract to all who implement it

This is a very naive approach. Quick and dirty to implement, but definitely not as fast as most other backends, especially at scale. One advantage it has is a very fast and simple preprocessing phase. So if you only need to run it once, this can actually beat the Walker Alias Method.

This is my implementation of the Walker Alias Method.

A struct and related functions to represent a single die, with any number of sides and weights.

Based on this blog post run reseed, to generate a cryptographically secure seed for your random number generators.