CRBRB
Copies a real band matrix stored in band storage mode.
Required Arguments
A — Real band matrix of order N. (Input)
NLCA — Number of lower codiagonals in A. (Input)
NUCA — Number of upper codiagonals in A. (Input)
B — Real band matrix of order N containing a copy of A. (Output)
NLCB — Number of lower codiagonals in B. (Input)
NLCB must be at least as large as NLCA.
NUCB — Number of upper codiagonals in B. (Input)
NUCB must be at least as large as NUCA.
Optional Arguments
N — Order of the matrices A and B. (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).
LDB — Leading dimension of B exactly as specified in the dimension statement of the calling program. (Input)
Default: LDB = SIZE (B,1).
FORTRAN 90 Interface
Generic: CALL CRBRB (A, NLCA, NUCA, B, NLCB, NUCB [, …])
Specific: The specific interface names are S_CRBRB and D_CRBRB.
FORTRAN 77 Interface
Single: CALL CRBRB (N, A, LDA, NLCA, NUCA, B, LDB, NLCB, NUCB)
Double: The double precision name is DCRBRB.
Description
The routine CRBRB copies the real band matrix A in band storage mode into the real band matrix B in band storage mode.
Example
A real band matrix of order 3, in band storage mode with one upper codiagonal, and one lower codiagonal is copied into another real band matrix also in band storage mode.
USE CRBRB_INT
USE WRRRN_INT
IMPLICIT NONE
! Declare variables
INTEGER LDA, LDB, N, NLCA, NLCB, NUCA, NUCB
PARAMETER (LDA=3, LDB=3, N=3, NLCA=1, NLCB=1, NUCA=1, NUCB=1)
!
REAL A(LDA,N), B(LDB,N)
! Set values for A (in band mode)
! A = ( 0.0 1.0 1.0 )
! ( 1.0 1.0 1.0 )
! ( 1.0 1.0 0.0 )
!
DATA A/0.0, 7*1.0, 0.0/
! Copy A to B
CALL CRBRB (A, NLCA, NUCA, B, NLCB, NUCB)
! Print results
CALL WRRRN ('B', B)
END
Output
B
1 2 3
1 0.000 1.000 1.000
2 1.000 1.000 1.000
3 1.000 1.000 0.000