subroutine WRITECONFIGSEED(S, L, SEED) | |
implicit none | |
integer*4, intent(in) :: L | |
integer*4, intent(in) :: SEED | |
integer*2, intent(out) :: S(1:L,1:L) | |
integer*4 :: i, j | |
real*8 :: genrand_real2 | |
call init_genrand(SEED) | |
do i = 1, L | |
do j = 1, L | |
S(i, j) = merge(1, -1, genrand_real2() < .5d0) | |
enddo | |
enddo | |
end subroutine WRITECONFIGSEED |