subroutine WRITECONFIG(S, L) | |
implicit none | |
integer*4, intent(in) :: L | |
integer*2, intent(out) :: S(1:L,1:L) | |
integer*4 :: SEED, i, j | |
real*8 :: genrand_real2 | |
SEED = 23456 | |
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 WRITECONFIG |