CCBCG
Converts a complex matrix in band storage mode to a complex matrix in full storage mode.
Required Arguments
A — Complex (NUC + 1 + NLC) by N matrix containing the band matrix in band mode. (Input)
NLC — Number of lower codiagonals in A. (Input)
NUC — Number of upper codiagonals in A. (Input)
B — Complex N by N matrix containing the band matrix in full mode. (Output)
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 CCBCG (A, NLC, NUC, B [])
Specific: The specific interface names are S_CCBCG and D_CCBCG.
FORTRAN 77 Interface
Single: CALL CCBCG (N, A, LDA, NLC, NUC, B, LDB)
Double: The double precision name is DCCBCG.
Description
The routine CCBCG converts the complex band matrix A of order N with mu = NUC upper codiagonals and ml = NLC lower codiagonals into the N × N complex general matrix B. The first mu rows of A are copied to the upper codiagonals of B, the next row of A is copied to the diagonal of B, and the last ml rows of A are copied to the lower codiagonals of B.
Example
A complex band matrix of order 4 in band storage mode with one upper codiagonal and three lower codiagonals is copied into a 4 × 4 complex general matrix.
 
USE CCBCG_INT
USE WRCRN_INT
 
IMPLICIT NONE
! Declare variables
INTEGER LDA, LDB, N, NLC, NUC
PARAMETER (LDA=5, LDB=4, N=4, NLC=3, NUC=1)
!
COMPLEX A(LDA,N), B(LDB,N)
! Set values for A (in band mode)
! A = ( 0.0+0.0i 2.0+1.0i 3.0+2.0i 4.0+3.0i )
! ( 1.0+0.0i 1.0+0.0i 1.0+0.0i 1.0+0.0i )
! ( -2.0+1.0i -3.0+2.0i -4.0+3.0i 0.0+0.0i )
! ( 0.0+0.0i 0.0+0.0i 0.0+0.0i 0.0+0.0i )
! ( -7.0+1.0i 0.0+0.0i 0.0+0.0i 0.0+0.0i )
!
DATA A/(0.0,0.0), (1.0,0.0), (-2.0,1.0), (0.0,0.0), (-7.0,1.0), &
(2.0,1.0), (1.0,0.0), (-3.0,2.0), 2*(0.0,0.0), (3.0,2.0), &
(1.0,0.0), (-4.0,3.0), 2*(0.0,0.0), (4.0,3.0), (1.0,0.0), &
3*(0.0,0.0)/
! Convert band matrix A to matrix B
CALL CCBCG (A, NLC, NUC, B)
! Print results
CALL WRCRN ('B', B)
END
Output
 
B
1 2 3 4
1 ( 1.000, 0.000) ( 2.000, 1.000) ( 0.000, 0.000) ( 0.000, 0.000)
2 (-2.000, 1.000) ( 1.000, 0.000) ( 3.000, 2.000) ( 0.000, 0.000)
3 ( 0.000, 0.000) (-3.000, 2.000) ( 1.000, 0.000) ( 4.000, 3.000)
4 (-7.000, 1.000) ( 0.000, 0.000) (-4.000, 3.000) ( 1.000, 0.000)