Skip to content

Code to produce weighted random choices of any source type

Notifications You must be signed in to change notification settings

ziplock9000/Weighted-Randomiser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Code to produce weighted random choices of any source type

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages