matheus__serpa icon

c++ lognorm

matheus__serpa | PRO | 09/11/20 09:49:45 PM UTC (Edited) | 0 ⭐ | 1550 👁️ | Never ⏰ | []
C++ |

360 B

|

None

|

0 👍

/

0 👎

#include <boost/random.hpp>
#include <iostream>
#include <random>
 
std::mt19937 rgenerator;
 
 
int main(int argc, char const *argv[])
{ 
    boost::lognormal_distribution<double> blndistribution(0.75, 12.4); // mean and std
 
    for (int i=0; i<20; i++)
        std::cout << "boost_lognormal_distribution: " << blndistribution(rgenerator) << std::endl;
 
    return 0;
}

Comments