CHBCB

Copies a complex Hermitian band matrix stored in band Hermitian storage mode to a complex band matrix stored in band storage mode.

Required Arguments

A — Complex band Hermitian matrix of order N. (Input)

NUCA — Number of codiagonals in A. (Input)

B — Complex 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 NUCA.

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 CHBCB (A, NUCA, B, NLCB, NUCB [])

Specific: The specific interface names are S_CHBCB and D_CHBCB.

FORTRAN 77 Interface

Single: CALL CHBCB (N, A, LDA, NUCA, B, LDB, NLCB, NUCB)

Double: The double precision name is DCHBCB.

Description

The routine CSBRB copies a complex matrix A stored in Hermitian band mode to a matrix B stored in complex band mode. The lower codiagonals of B are filled using the values in the upper codiagonals of A.

Comments

Informational errors

 

Type

Code

Description

3

1

An element on the diagonal has a complex part that is near zero, the complex part is set to zero.

4

1

An element on the diagonal has a complex part that is not zero.

Example

A complex Hermitian matrix of order 3 in band Hermitian storage mode with one upper codiagonal is copied to a complex matrix in band storage mode.

 

USE CHBCB_INT

USE WRCRN_INT

 

IMPLICIT NONE

! Declare variables

INTEGER LDA, LDB, N, NLCB, NUCA, NUCB

PARAMETER (N=3, NUCA=1, LDA=NUCA+1, NLCB=NUCA, NUCB=NUCA, &

LDB=NLCB+NUCB+1)

!

COMPLEX A(LDA,N), B(LDB,N)

! Set values for A (in band mode)

! A = ( 0.0+0.0i -1.0+1.0i -2.0+2.0i )

! ( 1.0+0.0i 1.0+0.0i 1.0+0.0i )

!

DATA A/(0.0,0.0), (1.0,0.0), (-1.0,1.0), (1.0,0.0), (-2.0,2.0), &

(1.0,0.0)/

! Copy a complex Hermitian band matrix

! to a complex band matrix

CALL CHBCB (A, NUCA, B, NLCB, NUCB)

! Print results

CALL WRCRN ('B', B)

END

Output

 

B

1 2 3

1 ( 0.000, 0.000) (-1.000, 1.000) (-2.000, 2.000)

2 ( 1.000, 0.000) ( 1.000, 0.000) ( 1.000, 0.000)

3 (-1.000,-1.000) (-2.000,-2.000) ( 0.000, 0.000)