Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | n | ||||
doubleprecision | :: | xr(*) | ||||
doubleprecision | :: | xi(*) | ||||
integer | :: | incx |
integer function mat_iwamax(n,xr,xi,incx) ! ident_41="@(#)M_LA::mat_iwamax(3fp):index of norminf(x)" integer :: n doubleprecision :: xr(*) doubleprecision :: xi(*) integer :: incx doubleprecision :: s doubleprecision :: p integer :: i, k integer :: ix k = 0 if (n .gt. 0) then k = 1 s = 0.0d0 ix = 1 do i = 1, n p = dabs(xr(ix)) + dabs(xi(ix)) if (p .gt. s) k = i if (p .gt. s) s = p ix = ix + incx enddo endif mat_iwamax = k end function mat_iwamax