matheus__serpa

c++ lognorm

Sep 11th, 2020 (edited)
1,385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <boost/random.hpp>
  2. #include <iostream>
  3. #include <random>
  4.  
  5. std::mt19937 rgenerator;
  6.  
  7.  
  8. int main(int argc, char const *argv[])
  9. {
  10.     boost::lognormal_distribution<double> blndistribution(0.75, 12.4); // mean and std
  11.  
  12.     for (int i=0; i<20; i++)
  13.         std::cout << "boost_lognormal_distribution: " << blndistribution(rgenerator) << std::endl;
  14.  
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment