We are going to generate random numbers, shape them, and print their distribution patterns to the terminal. This way, we can get to know all of them and understand the most important ones, which is useful if we ever need to model something specific with randomness in mind:
- At first, we include all the needed headers and declare that we use the std namespace:
#include <iostream> #include <iomanip> #include <random> #include <map> #include <string> #include <algorithm> using namespace std;
- For every distribution the STL provides, we will print a histogram in order to see its characteristics because every distribution looks very special. It accepts a distribution as an argument and the number of samples that shall be taken ...