Did someone know how to generate random numbers with a non-uniform density?
Easiest solution if applicable: Use C++11 random facilities or the ones from Boost, which have lots of non-uniform distributions for you.
Use a uniform density RNG, and pass its result through a mapping function to convert to your desired density distribution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With