Generate random number with non-uniform density

后端 未结 5 921
我在风中等你
我在风中等你 2021-01-03 04:31

Did someone know how to generate random numbers with a non-uniform density?

5条回答
  •  旧巷少年郎
    2021-01-03 05:08

    Easiest solution if applicable: Use C++11 random facilities or the ones from Boost, which have lots of non-uniform distributions for you.

提交回复
热议问题