Random number generator object with its procedures
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | o_iseed | ||||
type(rndSeed), | public | :: | seed |
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 current seeds to a seeds object and, optionally, to a file unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgen) | :: | this | ||||
type(rndSeed), | intent(out) | :: | u_mseed | |||
integer, | intent(in), | optional | :: | und |
Read the seeds from a seeds object or, optionally, from a file unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rndgen) | :: | this | ||||
type(rndSeed), | intent(in) | :: | u_mseed | |||
integer, | intent(in), | optional | :: | und |