LINCT
Computes the inverse of a complex triangular matrixs.
Required Arguments
A — Complex N by N matrix containing the triangular matrix to be inverted. (Input)
For a lower triangular matrix, only the lower triangle of A is referenced. For an upper triangular matrix, only the upper triangle of A is referenced.
AINV — Complex N by N matrix containing the inverse of A. (Output)
If A is lower triangular, AINV is also lower triangular. If A is upper triangular, AINV is also upper triangular. If A is not needed, A and AINV can share the same storage locations.
Optional Arguments
N — Number of equations. (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).
IPATH — Path indicator. (Input)
IPATH = 1 means A is lower triangular.
IPATH = 2 means A is upper triangular.
Default: IPATH = 1.
LDAINV — Leading dimension of AINV exactly as specified in the dimension statement of the calling program. (Input)
Default: LDAINV = size (AINV,1).
FORTRAN 90 Interface
Generic: CALL LINCT (A, AINV [,])
Specific: The specific interface names are S_LINCT and D_LINCT.
FORTRAN 77 Interface
Single: CALL LINCT (N, A, LDA, IPATH, AINV, LDAINV)
Double: The double precision name is DLINCT.
Description
Routine LINCT computes the inverse of a complex triangular matrix. It fails if A has a zero diagonal element.
Comments
Informational error
Type
Code
Description
4
1
The input triangular matrix is singular. Some of its diagonal elements are close to zero.
Example
The inverse is computed for a 3 × 3 lower triangular matrix.
 
USE LINCT_INT
USE WRCRN_INT
! Declare variables
INTEGER LDA
PARAMETER (LDA=3)
COMPLEX A(LDA,LDA), AINV(LDA,LDA)
! Set values for A
!
! A = ( -3.0+2.0i )
! ( -2.0-1.0i 0.0+6.0i )
! ( -1.0+3.0i 1.0-5.0i -4.0+0.0i )
!
DATA A/(-3.0,2.0), (-2.0,-1.0), (-1.0, 3.0), (0.0,0.0), (0.0,6.0),&
(1.0,-5.0), (0.0,0.0), (0.0,0.0), (-4.0,0.0)/
!
! Compute the inverse of A
CALL LINCT (A, AINV)
! Print results
CALL WRCRN (’AINV’, AINV)
END
Output
 
AINV
1 2 3
1 (-0.2308,-0.1538) ( 0.0000, 0.0000) ( 0.0000, 0.0000)
2 (-0.0897, 0.0513) ( 0.0000,-0.1667) ( 0.0000, 0.0000)
3 ( 0.2147,-0.0096) (-0.2083,-0.0417) (-0.2500, 0.0000)