CHFCG
Extends a complex Hermitian matrix defined in its upper triangle to its lower triangle.
Required Arguments
A — Complex Hermitian matrix of order N. (Input/Output)
On input, the upper triangle of A defines a Hermitian matrix. On output, the lower triangle of A is defined so that A is Hermitian.
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 CHFCG (A [])
Specific: The specific interface names are S_CHFCG and D_CHFCG.
FORTRAN 77 Interface
Single: CALL CHFCG (N, A, LDA)
Double: The double precision name is DCHFCG.
Description
The routine CHFCG converts an N × N complex matrix A in Hermitian mode into a complex general matrix by filling in the lower triangular portion of A using the values defined in its upper triangular portion.
Informational errors
Type
Code
Description
3
1
The matrix is not Hermitian. It has a diagonal entry with a small imaginary part.
4
2
The matrix is not Hermitian. It has a diagonal entry with an imaginary part.
Example
A complex 3 × 3 Hermitian matrix defined in its upper triangle is extended to its lower triangle.

USE CHFCG_INT
USE WRCRN_INT

IMPLICIT NONE
! Declare variables
INTEGER LDA, N
PARAMETER (LDA=3, N=3)
!
COMPLEX A(LDA,N)
! Set values for A
! A = ( 1.0+0.0i 1.0+1.0i 1.0+2.0i )
! ( 2.0+0.0i 2.0+2.0i )
! ( 3.0+0.0i )
!
DATA A/(1.0,0.0), 2*(0.0,0.0), (1.0,1.0), (2.0,0.0), (0.0,0.0), &
(1.0,2.0), (2.0,2.0), (3.0,0.0)/
! Fill in lower Hermitian matrix
CALL CHFCG (A)
! Print results
CALL WRCRN ('A', A)
END
Output

A
1 2 3
1 ( 1.000, 0.000) ( 1.000, 1.000) ( 1.000, 2.000)
2 ( 1.000,-1.000) ( 2.000, 0.000) ( 2.000, 2.000)
3 ( 1.000,-2.000) ( 2.000,-2.000) ( 3.000, 0.000)