random Module

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Uses


Contents


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: dp = SELECTED_REAL_KIND(12, 60)

Functions

public function random_normal() result(fn_val)

Arguments

None

Return Value real

public function random_gamma(s, first) result(fn_val)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: s
logical, intent(in) :: first

Return Value real

public function random_gamma1(s, first) result(fn_val)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: s
logical, intent(in) :: first

Return Value real

public function random_gamma2(s, first) result(fn_val)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: s
logical, intent(in) :: first

Return Value real

public function random_chisq(ndf, first) result(fn_val)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ndf
logical, intent(in) :: first

Return Value real

public function random_exponential() result(fn_val)

Arguments

None

Return Value real

public function random_Weibull(a) result(fn_val)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: a

Return Value real

public function random_beta(aa, bb, first) result(fn_val)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: aa
real, intent(in) :: bb
logical, intent(in) :: first

Return Value real

public function random_t(m) result(fn_val)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: m

Return Value real

public function random_inv_gauss(h, b, first) result(fn_val)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: h
real, intent(in) :: b
logical, intent(in) :: first

Return Value real

public function random_Poisson(mu, first) result(ival)

This work was supported by grant CA-16672 from the National Cancer Institute.

Read more…

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: mu
logical, intent(in) :: first

Return Value integer

public function random_binomial1(n, p, first) result(ival)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real, intent(in) :: p
logical, intent(in) :: first

Return Value integer

public function bin_prob(n, p, r) result(fn_val)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real, intent(in) :: p
integer, intent(in) :: r

Return Value real

public function lngamma(x) result(fn_val)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x

Return Value real(kind=dp)

public function random_binomial2(n, pp, first) result(ival)

This work was supported by grant CA-16672 from the National Cancer Institute.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real, intent(in) :: pp
logical, intent(in) :: first

Return Value integer

public function random_neg_binomial(sk, p) result(ival)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: sk
real, intent(in) :: p

Return Value integer

public function random_von_Mises(k, first) result(fn_val)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: k
logical, intent(in) :: first

Return Value real

public function random_Cauchy() result(fn_val)

Arguments

None

Return Value real


Subroutines

public subroutine random_mvnorm(n, h, d, f, first, x, ier)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real, intent(in) :: h(:)
real, intent(in) :: d(:)
real, intent(inout) :: f(:)
logical, intent(in) :: first
real, intent(out) :: x(:)
integer, intent(out) :: ier

public subroutine random_order(order, n)

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: order(n)
integer, intent(in) :: n

public subroutine seed_random_number(iounit)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iounit