API Reference weighted_random v#1.0.0-alpha.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 just a wrapper around the WAM hex package, which implements the Walker Alias Method.

Implement standard dice notation with ~d{num_dice, sides, optional_modifier}

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

This is mostly for use in Livebooks.