Initializes me%mt(nn)
with a seed
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mt19937), | intent(inout) | :: | me | |||
integer(kind=i8), | intent(in) | :: | seed |
subroutine init_genrand64(me,seed) !! Initializes `me%mt(nn)` with a seed implicit none class(mt19937),intent(inout) :: me integer(i8), intent(in) :: seed integer :: i me%mt(1) = seed do i = 1, nn-1 me%mt(i+1) = 6364136223846793005_i8 * ieor(me%mt(i), ishft(me%mt(i), -62)) + i end do me%mti = nn end subroutine init_genrand64