Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=dp), | private, | parameter | :: | am | = | 4.656612873077392578d-10 |
Random number generator object for power-law distribution, adapted from Silvio C. Ferreira code. The power-law distribution is given by P(k) = k^(-gamma), where k is an integer between kmin and kmax.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=i4), | public | :: | o_iseed | ||||
type(rndSeed), | public | :: | seed | ||||
real(kind=dp), | private | :: | AA | ||||
real(kind=dp), | private | :: | expo | ||||
real(kind=dp), | private | :: | x0 | ||||
real(kind=dp), | private | :: | xc | ||||
real(kind=dp), | public | :: | gamma | ||||
integer(kind=i4), | public | :: | kmin | ||||
integer(kind=i4), | public | :: | kmax | ||||
real(kind=dp), | private, | allocatable | :: | prob(:) |
procedure, public :: rnd => rnd_rndgen_dp | |
procedure, public :: int => int_rndgen_i4 | |
procedure, public :: int_i4 => int_rndgen_i4 | |
procedure, public :: int_i8 => int_rndgen_i8 | |
procedure, public :: real => real_rndgen_dp | |
procedure, public :: real_sp => real_rndgen_sp | |
procedure, public :: init => init_rndgen | |
procedure, public :: reset => reset_rndgen | |
procedure, public :: save_seed => save_seed_rndgen | |
procedure, public :: read_seed => read_seed_rndgen | |
generic, public :: rnd_array => rnd_array_rnd, rnd_array_real, rnd_array_int_i4 | |
procedure, public :: rnd_array_i4 => rnd_array_int_i4 | |
procedure, public :: rnd_array_i8 => rnd_array_int_i8 | |
procedure, public :: rndPL => rndPL_rndgenPL | |
procedure, public :: initPL => initPL_rndgenPL | |
procedure, public :: rndPL_array |
Generates a random number following the power-law distribution
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgenPL) | :: | this |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgenPL), | intent(in) | :: | gen | |||
integer(kind=i4), | intent(in) | :: | n |
Initializes the power-law random number generator
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgenPL) | :: | this | ||||
integer(kind=i4), | intent(in) | :: | kmin | |||
integer(kind=i4), | intent(in) | :: | kmax | |||
real(kind=dp), | intent(in) | :: | gama | |||
integer, | intent(in), | optional | :: | iseed |