GiacomoLeoneMaria / random_generators

Several implementations are implemented in the program for generating pseudo-random numbers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Several implementations are implemented in the program for generating pseudo-random numbers extracted from :

a uniform distribution using Linear congruential generator
an exponential distribution
a Gaussian distribution with the Box-Muller method.
a Gaussian distribution with the accept-reject method. 

The Linear congruential generator uses as parameters the values m_a = 1664525, m_c = 1013904223 and m_m = 231.

In the main.cpp file the accept-reject method is implemented as an example with different parameters.

In order to compile and execute the file you need to have ROOT - CERN installed on your computer for the histogram plot.

About

Several implementations are implemented in the program for generating pseudo-random numbers


Languages

Language:C++ 89.5%Language:Makefile 10.5%