Extends a complex Hermitian matrix defined in its upper triangle to its lower triangle.
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.
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).
Generic: CALL CHFCG (A [,…])
Specific: The specific interface names are S_CHFCG and D_CHFCG.
Single: CALL CHFCG (N, A, LDA)
Double: The double precision name is DCHFCG.
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
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.
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
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)
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |