CSFRG
Extends a real symmetric matrix defined in its upper triangle to its lower triangle.
Required Arguments
A — N by N symmetric matrix of order N to be filled out. (Input/Output)
Optional Arguments
N — Order of the matrix A. (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 CSFRG (A [, …])
Specific: The specific interface names are S_CSFRG and D_CSFRG.
FORTRAN 77 Interface
Single: CALL CSFRG (N, A, LDA)
Double: The double precision name is DCSFRG.
Description
The routine CSFRG converts an N × N matrix A in symmetric mode into a general matrix by filling in the lower triangular portion of A using the values defined in its upper triangular portion.
Example
The lower triangular portion of a real 3 × 3 symmetric matrix is filled with the values defined in its upper triangular portion.
USE CSFRG_INT
USE WRRRN_INT
IMPLICIT NONE
! Declare variables
INTEGER LDA, N
PARAMETER (LDA=3, N=3)
!
REAL A(LDA,N)
! Set values for A
! A = ( 0.0 3.0 4.0 )
! ( 1.0 5.0 )
! ( 2.0 )
!
DATA A/3*0.0, 3.0, 1.0, 0.0, 4.0, 5.0, 2.0/
! Fill the lower portion of A
CALL CSFRG (A)
! Print results
CALL WRRRN ('A', A)
END
A
1 2 3
1 0.000 3.000 4.000
2 3.000 1.000 5.000
3 4.000 5.000 2.000