An open API service indexing awesome lists of open source software.

https://github.com/snyderks/stairs

A Go library to randomly select items from a weighted array.
https://github.com/snyderks/stairs

array golang random selection weighted

Last synced: over 1 year ago
JSON representation

A Go library to randomly select items from a weighted array.

Awesome Lists containing this project

README

          

# Stairs

Stairs is a utility to randomly select items from a weighted array quickly and without high memory usage by creating continuous distribution functions to select from.

To install, simply `go get github.com/snyderks/stairs` and `import github.com/snyderks/stairs` to use in your project.

See `stairs_test.go` for basic usage.