scramble a vector of reals
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(inout), | dimension(1:lg) | :: | tab | ||
integer(kind=i4), | intent(in) | :: | lg |
subroutine scramble(tab, lg) !================================================================================================ !! scramble a vector of reals !------------------------------------------------------------------------------------------------ implicit none integer(kind=i4), intent(in ) :: lg real(kind=r8) , intent(inout), dimension(1:lg) :: tab real(kind=r8), dimension(1:lg) :: tmp integer(kind=i4) :: i call random_number( harvest = tmp(1:lg) ) call sort_array2(tab_inout = tmp(1:lg), & ! tab1 = tab(1:lg), n = lg) ! return endsubroutine scramble