CosmicFish
Reference documentation for version 1.0
Looking into future Cosmology
|
This module contains the subroutine and functions to generate random numbers from different distributions. This file contains part of code from the CosmoMC code with some additions and some modifications. The part coming from the CosmoMC code is copyrighted by its author. More...
Functions/Subroutines | |
subroutine | initrandom (i, i2) |
real(dl) function | random_uniform (a, b) |
This function returns a random number generated from the uniform distribution in [a,b(. To improve performances no check is done in order to ensure that the random number generator is initialised. More... | |
real(dl) function | gaussian_1 () |
This function returns a random number generated from the gaussian distribution with mean zero and variance one. It works with the Box-Muller transformation. To improve performances no check is done in order to ensure that the random number generator is initialised. | |
real(dl) function | random_gaussian (mu, sigma) |
This function returns a random number generated from the gaussian distribution with mean mu and variance sigma. To improve performances no check is done in order to ensure that the random number generator is initialised. More... | |
subroutine | rmarin (IJ, KL) |
double precision function | ranmar () |
This function returns a random number generated from the uniform distribution in [0,1( This is the random number generator proposed by George Marsaglia in Florida State University Report: FSU-SCRI-87-50 It was slightly modified by F. James to produce an array of pseudorandom numbers. | |
Variables | |
integer | rand_inst = 0 |
integer, parameter | krand = KIND(1.d0) |
integer | rand_feedback = 1 |
This module contains the subroutine and functions to generate random numbers from different distributions. This file contains part of code from the CosmoMC code with some additions and some modifications. The part coming from the CosmoMC code is copyrighted by its author.
real(dl) function random_utilities::random_gaussian | ( | real(dl), intent(in) | mu, |
real(dl), intent(in) | sigma | ||
) |
This function returns a random number generated from the gaussian distribution with mean mu and variance sigma. To improve performances no check is done in order to ensure that the random number generator is initialised.
[in] | mu | the mean of the distribution |
[in] | sigma | the variance of the distribution |
Definition at line 128 of file 002_Random_utilities.f90.
real(dl) function random_utilities::random_uniform | ( | real(dl), intent(in) | a, |
real(dl), intent(in) | b | ||
) |
This function returns a random number generated from the uniform distribution in [a,b(. To improve performances no check is done in order to ensure that the random number generator is initialised.
[in] | a | lower bound of the interval |
[in] | b | upper bound on the interval |
Definition at line 80 of file 002_Random_utilities.f90.