init_genrand64 Subroutine

private subroutine init_genrand64(me, seed)

Initializes me%mt(nn) with a seed

Type Bound

mt19937

Arguments

Type IntentOptional Attributes Name
class(mt19937), intent(inout) :: me
integer(kind=i8), intent(in) :: seed

Called by

proc~~init_genrand64~~CalledByGraph proc~init_genrand64 mt19937%init_genrand64 none~initialize mt19937%initialize none~initialize->proc~init_genrand64 proc~init_by_array64 mt19937%init_by_array64 none~initialize->proc~init_by_array64 proc~init_genrand64_i4 mt19937%init_genrand64_i4 none~initialize->proc~init_genrand64_i4 proc~genrand64_int64 mt19937%genrand64_int64 proc~genrand64_int64->proc~init_genrand64 proc~init_by_array64->proc~init_genrand64 proc~genrand64_real1 mt19937%genrand64_real1 proc~genrand64_real1->proc~genrand64_int64 proc~genrand64_real2 mt19937%genrand64_real2 proc~genrand64_real2->proc~genrand64_int64 proc~genrand64_real3 mt19937%genrand64_real3 proc~genrand64_real3->proc~genrand64_int64 proc~init_genrand64_i4->none~initialize proc~rninit pikaia_class%rninit proc~rninit->none~initialize proc~pikaia pikaia_class%pikaia proc~pikaia->proc~rninit proc~urand pikaia_class%urand proc~pikaia->proc~urand proc~cross pikaia_class%cross proc~pikaia->proc~cross proc~mutate pikaia_class%mutate proc~pikaia->proc~mutate proc~select_parents pikaia_class%select_parents proc~pikaia->proc~select_parents proc~stdrep pikaia_class%stdrep proc~pikaia->proc~stdrep proc~urand->proc~genrand64_real1 proc~cross->proc~urand proc~mutate->proc~urand proc~select_parents->proc~urand proc~solve_with_pikaia pikaia_class%solve_with_pikaia proc~solve_with_pikaia->proc~pikaia proc~stdrep->proc~urand program~test_algen test_algen program~test_algen->proc~solve_with_pikaia

Source Code

  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