subroutine loduni(nbase,n,y) C----------------------------------------------------------------------- C Quiet start C Load an uniform distribution using the Hammersley's sequence. C (NBASE=0 ==> Random sampling !) C----------------------------------------------------------------------- dimension y(*) C C C----Random and Quasi-Random Loading C if(nbase.eq.0) then c c Random do 100 i=1,n 100 y(i)=ranf() c c First element of Hammersley's sequence else if(nbase.eq.1) then do 110 i=1,n 110 y(i) = (i-0.5)/n c c Radical-inverse Function in base NBASE else if(nbase.gt.1) then do 120 i=1,n xs = 0. xsi = 1.0 j2 = i 1 xsi = xsi/nbase j1 = j2/nbase xs = xs + (j2-nbase*j1)*xsi j2 = j1 if( j2.gt.0 ) goto 1 120 y(i) = xs end if c return end c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*