Loading…

How do you implement Vose's alias method for O(1) weighted sampling?