samedi 15 mai 2021

How do I get the logarithmic distribution in C++ with probability P? [duplicate]

I want to write a function in C++.Every time I run this function I get a random integer.The integer fits a Logarithmic distribution with probability p, where p is a number that can be adjusted. not logNormal distribution.But I do not know how to write the corresponding function in C ++, I want to get your help, please help me,thank you.




Aucun commentaire:

Enregistrer un commentaire