KaimiraWeightedList: A generic collection for selecting random elements by weight in O(1) in C#
This class implements an algorithm for sampling from a discrete probability distribution via a generic list with extremely fast O(1) get operations and small (close to minimally small) O(n) space complexity and O(n) CRUD complexity.
https://github.com/cdanek/KaimiraWeightedList
#dsa #weightedlist
Post #2067
226