Generate random number with non-uniform density

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

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

5条回答
  •  青春惊慌失措
    2021-01-03 04:58

    Use a uniform density RNG, and pass its result through a mapping function to convert to your desired density distribution.

提交回复
热议问题