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 seeds object
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=i8), | private | :: | mseed(4) |
procedure, public :: saveToFile => saveToFile_rndSeed | |
procedure, public :: readFromFile => readFromFile_rndSeed |
Random number generator object with its procedures
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | o_iseed | ||||
type(rndSeed), | public | :: | seed |
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 |
Generates a random number in the range [0, 1)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgen) | :: | this |
Generates a random integer number in the range [i1, i2]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgen) | :: | this | ||||
integer(kind=i16), | intent(in) | :: | i1 | |||
integer(kind=i16), | intent(in) | :: | i2 |
Generates a random real number in the range [r1, r2)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgen) | :: | this | ||||
real(kind=dp), | intent(in) | :: | r1 | |||
real(kind=dp), | intent(in) | :: | r2 |
Initializes the random number generator
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgen) | :: | this | ||||
integer(kind=i8) | :: | iseed |
Resets the random number generator
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgen) | :: | this |
Save the seeds to a file unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndSeed) | :: | this | ||||
integer, | intent(in) | :: | und |
Read the seeds from a file unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndSeed) | :: | this | ||||
integer, | intent(in) | :: | und |