Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 531 Bytes

README.md

File metadata and controls

11 lines (7 loc) · 531 Bytes

Weighted Randomiser

A class to produce weighted random choices of any source type

Windows console app to demonstrate the class

It would be great if someone has time to optimise this to work for huge lists, pick random values very fast and have an unallocating version that would work well with games to reduce garbage collections

NOTE: Code originally from Philipp @ https://gamedev.stackexchange.com/questions/162976/how-do-i-create-a-weighted-collection-and-then-pick-a-random-element-from-it

A CHANGE HERE FOR TESTING