SamplableSet
-
Jean Gabriel Young: Periodic shoutout to @stonge_g’s pybind class https://github.com/gstonge/SamplableSet… A ton of models involve sampling from sets of objects with different weights. The lazy strategy takes O(n) time… SamplableSet does it in O(log(log n)). I use it to speed up my simulations all the time.