NR1RB
Computes the 1-norm of a real band matrix in band storage mode.
Required Arguments
A — Real (NUCA + NLCA + 1) by N array containing the N by N band matrix in band storage mode. (Input)
NLCA — Number of lower codiagonals of A. (Input)
NUCA — Number of upper codiagonals of A. (Input)
ANORM — Real scalar containing the 1-norm of A. (Output)
Optional Arguments
N — Order of the matrix. (Input)
Default: N = SIZE (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement of the calling program. (Input)
Default: LDA = SIZE (A,1).
FORTRAN 90 Interface
Generic: CALL NR1RB (A, NLCA, NUCA, ANORM [, …])
Specific: The specific interface names are S_NR1RB and D_NR1RB.
FORTRAN 77 Interface
Single: CALL NR1RB (N, A, LDA, NLCA, NUCA, ANORM)
Double: The double precision name is DNR1RB.
Description
The routine NR1RB computes the 1-norm of a real band matrix A. The 1-norm of a matrix A is
This is the maximum of the sums of the absolute values of the column elements.
Example
Compute the 1-norm of a 4 × 4 real band matrix stored in band mode.
USE NR1RB_INT
USE UMACH_INT
IMPLICIT NONE
! Declare variables
INTEGER LDA, N, NLCA, NUCA
PARAMETER (LDA=4, N=4, NLCA=2, NUCA=1)
!
INTEGER NOUT
REAL A(LDA,N), ANORM
!
! Set values for A (in band mode)
! A = ( 0.0 2.0 2.0 3.0 )
! ( -2.0 -3.0 -4.0 -1.0 )
! ( 2.0 1.0 0.0 0.0 )
! ( 0.0 1.0 0.0 0.0 )
!
DATA A/0.0, -2.0, 2.0, 0.0, 2.0, -3.0, 1.0, 1.0, 2.0, -4.0, 0.0, &
0.0, 3.0, -1.0, 2*0.0/
! Compute the L1 norm of A
CALL NR1RB (A, NLCA, NUCA, ANORM)
! Print results
CALL UMACH (2, NOUT)
WRITE (NOUT,*) ' The 1-norm of A is ', ANORM
END
The 1-norm of A is 7.00000