Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created April 26, 2017 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/65c507561f71078a89556d163fe457dd to your computer and use it in GitHub Desktop.
Save deque-blog/65c507561f71078a89556d163fe457dd to your computer and use it in GitHub Desktop.
std::vector<Weighted<char>> weighted_letters = {
{'a', 2}, {'b', 1}, {'c', 1}, {'d', 1}, {'e', 2}
};
auto weighted_letters_gen = weighted_choice_gen(weighted_letters);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment