MatrixNorm0_Full.F
c**********************************************************************
#include "author.inc"
c* $Id: MatrixNorm0_Full.F,v 1.4 1995/12/21 00:08:38 turner Exp $
c*
c* Computes the infinity norm of a rectangular matrix.
c*
c* n
c* ---
c* \
c* infinity norm ==> max / | a |
c* 1<=i<=m --- ij
c* j=1
c*
c* WARNING: Note that JT_MatrixNormF_Full *must* be declared real in
c* routines that use it.
c*
c* <PARAMETER LIST>
c*
c* Input:
c* idim - leading dimension of a
c* nrows - number of rows in a
c* ncols - number of columns in a
c* a - matrix
c*
c* Output:
c* status - return status
c* -2 ==> memory allocation failure
c* 0 ==> success
c*
c* <FUNCTIONS REQUIRED>
c*
c* JT_VectorNorm
c*
#include "arrays-MatrixNorm0_Full.inc"
c*
#include "copyright.inc"
c**********************************************************************
real function JT_MatrixNorm0_Full (idim, nrows, ncols, a, status)
implicit none
c
c ... Input:
integer idim, nrows, ncols
real a(idim,ncols)
c
c ... Output:
integer status
c
c ... Local:
integer i, j
real zero
real JT_VectorNorm
#include "declare-MatrixNorm0_Full.inc"
c
parameter (zero=0.0d0)
c
c ... Initialize return status.
status = 0
c
c ... Initialize function result.
JT_MatrixNorm0_Full = zero
c
#include "allocate-MatrixNorm0_Full.inc"
c
call JT_FillVectorFloat (nrows, zero, rowsum, status)
do j=1,ncols
do i=1,nrows
rowsum(i) = rowsum(i) + ABS(a(i,j))
enddo
enddo
JT_MatrixNorm0_Full = JT_VectorNorm(0, nrows, rowsum, status)
c
9999 continue
#include "deallocate-MatrixNorm0_Full.inc"
c
return
end