I'm familiar with discrete and weighted distributions,I just
can't seem to figure out how to do what I need...
I need to be able to pick a random item from a vector with eqch
item having a different probability of being chosen. Also, I'm looking to manually fill the vector with specific items. I can't seem to figure
this out or find the appropriate code
Any help is welcome
A 'while' loop, and remove the eliminated element from the vector and re-initialize the dist every time in the loop.
You shouldn't need to re-initialize the rng each loop iteration. That can happen once, at the beginning before the loop.
What is your compiler? What is your standard library? Exact version numbers please.
Some obsolete implementations don't completely implement the stuff in <random>. For example std::random_device might be pseudorandom (if I remember correctly) in some versions of libstdc++.