Previous Next Contents Generated Index Doc Set Home



Reciprocal Condition Number of a Triangular Matrix in Packed Storage

The subroutines described in this section estimate the reciprocal condition number, in either the 1-norm or the -norm, of a triangular matrix A in packed storage.

Calling Sequence

CALL DTPCON 
(NORM, UPLO, DIAG, N, DA, DRCOND, DWORK, IWORK2, INFO)
CALL STPCON 
(NORM, UPLO, DIAG, N, SA, SRCOND, SWORK, IWORK2, INFO)
CALL ZTPCON 
(NORM, UPLO, DIAG, N, ZA, DRCOND, ZWORK, DWORK2, INFO)
CALL CTPCON 
(NORM, UPLO, DIAG, N, CA, SRCOND, CWORK, SWORK2, INFO)






void dtpcon 
(char norm, char uplo, char diag, int n, double *da, 
double *drcond, int *info)
void stpcon 
(char norm, char uplo, char diag, int n, float *sa, 
float *srcond, int *info)
void ztpcon 
(char norm, char uplo, char diag, int n, doublecomplex 
*za, double *drcond, int *info)
void ctpcon 
(char norm, char uplo, char diag, int n, complex *ca, 
float *srcond, int *info)

Arguments

NORM

Indicates whether the 1-norm condition number or the -norm condition number is required. The legal values for NORM are listed below. Any values not listed below are illegal.

'O', 'o', or '1'

1-norm condition number is required.

'I' or 'i'

-norm condition number is required.

UPLO

Indicates whether xA contains the upper or lower triangle of the matrix. The legal values for UPLO are listed below. Any values not listed below are illegal.

'U' or 'u'

xA contains the upper triangle.

'L' or 'l'

xA contains the lower triangle.

DIAG

Indicates whether or not A is unit triangular. The legal values for DIAG are listed below. Any values not listed below are illegal.

'N' or 'n'

A is not unit triangular.

'U' or 'u'

A is unit triangular.

N

Order of the matrix A. N 0.

xA

Upper or lower triangular matrix A.
The dimension of xA is (N × N + N) / 2.

xRCOND

On exit, the estimated reciprocal of the condition number of the matrix A where the reciprocal condition number of A is defined to be 1 / (||A|| × ||A-1||). The reciprocal of the condition number is estimated instead of the condition number itself to avoid overflow or division by zero. If RCOND is less than machine precision (in particular, if RCOND = 0) then A is singular to working precision.

xWORK

Scratch array with a dimension of 3 × N for real subroutines or 2 × N for complex subroutines.

xWORK2

Scratch array with a dimension of N.

INFO

On exit:

INFO = 0

Subroutine completed normally.

INFO < 0

The ith argument, where i = |INFO|, had an illegal value.

Sample Program




      PROGRAM TEST
      IMPLICIT NONE
C
      DOUBLE PRECISION  ZERO
      INTEGER           LDA, LDIWRK, LDWORK, N
      PARAMETER        (N = 3)
      PARAMETER        (LDA = ((N + 1) * N) / 2)
      PARAMETER        (LDIWRK = N)
      PARAMETER        (LDWORK = 3 * N)
      PARAMETER        (ZERO = 0.0D0)
C
      DOUBLE PRECISION  A(LDA), RCOND, WORK(LDWORK)
      INTEGER           INFO, IWORK(LDIWRK)
C
      EXTERNAL          DTPCON
      INTRINSIC         ABS
C
C     Initialize A to store in packed triangular form the matrix A
C     shown below.
C
C         1  2  4
C     A = 0  3  5
C         0  0  6
C
      DATA A / 1.0D0, 2.0D0, 3.0D0, 2.0D0, 3.0D0, 3.0D0 /
C
      PRINT 1000
      PRINT 1010, A(1), A(2), A(4)
      PRINT 1010, ZERO, ZERO, A(5)
      PRINT 1010, ZERO, A(5), A(6)
C
      CALL DTPCON ('ONE-NORM OF A', 'UPPER TRIANGULAR A',
     $             'NO UNIT DIAGONAL A', N, A, RCOND, WORK, IWORK,
     $             INFO)
      IF (INFO .NE. 0) THEN
        PRINT 1020, ABS(INFO)
        STOP 1
      END IF
      PRINT 1030, 1.0D0 / RCOND
C
 1000 FORMAT ('A:')
 1010 FORMAT (3(3X, F5.2))
 1020 FORMAT (1X, 'Illegal argument to DTPCON, argument #', I2)
 1030 FORMAT (/1X, 'Estimated condition number of A: ', F7.4)
C
      END
 

Sample Output

 
A:
    1.00    2.00    2.00
    0.00    0.00    3.00
    0.00    3.00    3.00



 Estimated condition number of A:  8.0000






Previous Next Contents Generated Index Doc Set Home