CosmicFish  Reference documentation for version 1.0
Looking into future Cosmology
Modules | Functions/Subroutines | Variables
002_Random_utilities.f90 File Reference

This file contains several subroutine and functions that can be used to generate random numbers from different distributions. More...

Go to the source code of this file.

Modules

module  random_utilities
 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.
 

Functions/Subroutines

subroutine random_utilities::initrandom (i, i2)
 
real(dl) function random_utilities::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 random_utilities::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_utilities::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 random_utilities::rmarin (IJ, KL)
 
double precision function random_utilities::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 random_utilities::rand_inst = 0
 
integer, parameter random_utilities::krand = KIND(1.d0)
 
integer random_utilities::rand_feedback = 1
 

Detailed Description

This file contains several subroutine and functions that can be used to generate random numbers from different distributions.

Definition in file 002_Random_utilities.f90.