Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | dp | = | selected_real_kind(15) | |
integer, | private, | parameter | :: | i8 | = | selected_int_kind(8) | |
integer, | private, | parameter | :: | i16 | = | selected_int_kind(16) | |
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, | 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=i16), | public | :: | kmin | ||||
integer(kind=i16), | public | :: | kmax | ||||
real(kind=dp), | private, | allocatable | :: | prob(:) |
procedure, public :: rnd => rnd_rndgen | |
procedure, public :: int => int_rndgen | |
procedure, public :: real => real_rndgen | |
procedure, public :: init => init_rndgen | |
procedure, public :: reset => reset_rndgen | |
procedure, public :: save_seed => save_seed_rndgen | |
procedure, public :: read_seed => read_seed_rndgen | |
procedure, public :: rndPL => rndPL_rndgenPL | |
procedure, public :: initPL => initPL_rndgenPL |
Generates a random number following the power-law distribution
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgenPL) | :: | this |
Initializes the power-law random number generator
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgenPL) | :: | this | ||||
integer(kind=i16), | intent(in) | :: | kmin | |||
integer(kind=i16), | intent(in) | :: | kmax | |||
real(kind=dp), | intent(in) | :: | gama | |||
integer, | intent(in), | optional | :: | iseed |