CCGCG
Copies a complex general matrix.
Required Arguments
A — Complex matrix of order N. (Input)
B — Complex matrix of order N containing a copy of A. (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 CCGCG (A, B [])
Specific: The specific interface names are S_CCGCG and D_CCGCG.
FORTRAN 77 Interface
Single: CALL CCGCG (N, A, LDA, B, LDB)
Double: The double precision name is DCCGCG.
Description
The routine CCGCG copies the complex N × N general matrix A into the complex N × N general matrix B.
Example
A complex 3 × 3 general matrix is copied into another complex 3 × 3 general matrix.
 
USE CCGCG_INT
USE WRCRN_INT
 
IMPLICIT NONE
! Declare variables
INTEGER LDA, LDB, N
PARAMETER (LDA=3, LDB=3, N=3)
!
COMPLEX A(LDA,N), B(LDB,N)
! Set values for A
! A = ( 0.0+0.0i 1.0+1.0i 1.0+1.0i )
! ( -1.0-1.0i 0.0+0.0i 1.0+1.0i )
! ( -1.0-1.0i -1.0-1.0i 0.0+0.0i )
!
DATA A/(0.0,0.0), 2*(-1.0,-1.0), (1.0,1.0), (0.0,0.0), &
(-1.0,-1.0), 2*(1.0,1.0), (0.0,0.0)/
! Copy matrix A to matrix B
CALL CCGCG (A, B)
! Print results
CALL WRCRN ('B', B)
END
Output
 
B
1 2 3
1 ( 0.000, 0.000) ( 1.000, 1.000) ( 1.000, 1.000)
2 (-1.000,-1.000) ( 0.000, 0.000) ( 1.000, 1.000)
3 (-1.000,-1.000) (-1.000,-1.000) ( 0.000, 0.000)
Published date: 03/19/2020
Last modified date: 03/19/2020