Skip to content

Demonstration of a random weighted distribution generator

License

Notifications You must be signed in to change notification settings

juanmagutierrez/random_weighted

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Weighted Choice

An example of how to implement a random choice with weighted distribution. Demonstrated in multiple languages.

Contribution

  1. Check the issues list for a list of languages currently available.

  2. Comment that you've chosen that language to port. Please choose only one language to leave room for others wanting to contribute. Feel free to add an issue using the template for any language not yet listed.

  3. Implement random weighted choice with your chosen language. You can use any example choices or weights you'd like. Make sure the example tests the implementation at least 100 times and outputs the results. Check out the c++ implementation for an example.

  4. Send a PR request!

About

Demonstration of a random weighted distribution generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 34.6%
  • C++ 28.6%
  • Python 25.7%
  • JavaScript 9.1%
  • Makefile 2.0%