Previous Next Contents Generated Index Doc Set Home



Downdate an Augmented Cholesky Decomposition

The subroutines described in this section downdate an augmented Cholesky decomposition of the triangular part of an augmented QR decomposition.

Calling Sequence

CALL DCHDD 
(DA, LDA, N, DX, DZ, LDZ, NZ, DY, DRHO, DCOS, DSIN, 
INFO)
CALL SCHDD 
(SA, LDA, N, SX, SZ, LDZ, NZ, SY, SRHO, SCOS, SSIN, 
INFO)
CALL ZCHDD 
(ZA, LDA, N, ZX, ZZ, LDZ, NZ, ZY, DRHO, DCOS, DSIN, 
INFO)
CALL CCHDD 
(CA, LDA, N, CX, CZ, LDZ, NZ, CY, SRHO, SCOS, SSIN, 
INFO)






void dchdd 
(double *da, int lda, int n, double *dx, double *dz, 
int ldz, int nz, double *dy, double *drho, double 
*dcos, double *dsin, int *info)
void schdd 
(float *sa, int lda, int n, float *sx, float *sz, int 
ldz, int nz, float *sy, float *srho, float *scos, float 
*ssin, int *info)
void zchdd 
(doublecomplex *za, int lda, int n, doublecomplex *zx, 
doublecomplex *zz, int ldz, int nz, doublecomplex *zy, 
double *drho, double *dcos, double *dsin, int *info)
void cchdd 
(complex *ca, int lda, int n, complex *cx, complex *cz, 
int ldz, int nz, complex *cy, double *drho, double 
*dcos, double *dsin, int *info)

Arguments

xA

On entry, the upper triangular matrix A.
On exit, A has been downdated. The strict lower triangle of A is not referenced.

LDA

Leading dimension of the array A as specified in a dimension or type statement. LDA max(1,N).

N

Order of the matrix A. N 0.

xX

Row to be added to A.

xZ

Vectors to be downdated with A.

LDZ

Leading dimension on the array Z as specified in a dimension or type statement. LDZ max(1,N).

NZ

Number of vectors to be downdated with A. NZ 0. If NZ = 0 then Z, Y, and RHO are not used.

xY

Scalars for downdating the vectors in Z.

xRHO

On entry, the norms of the residual vectors that are to be downdated.
On exit, RHO has been downdated. If RHO(i) is negative on entry then it is not changed.

xCOS

Cosines of the transforming rotations.

xSIN

Sines of the transforming rotations.

INFO

On exit:

INFO = 0

Subroutine completed normally.

INFO = -1

A could not be downdated; all values are left unchanged.

INFO = 1

Some RHOs could not be downdated; all RHOs that could not be downdated are changed to -1.

Sample Program

 
      PROGRAM TEST
      IMPLICIT NONE
C
      INTEGER           LDA, N, NOPIV, NZ
      PARAMETER        (N = 4)
      PARAMETER        (LDA = N)
      PARAMETER        (NOPIV = 0)
      PARAMETER        (NZ = 0)
C
      DOUBLE PRECISION  A(LDA,N), ANULL, C(N), S(N), WORK(N), X(N)
      INTEGER           I, INFO, IPIVOT(N), J, JOB, NULL
C
      EXTERNAL          DCHDC, DCHDD
C
C     Initialize the arrays A and Z to store the matrices A and Z
C     shown below and initialize X and Y to store the vectors x
C     and y shown below.
C
C         4  3  2  1        1
C     A = 3  4  3  2    x = 1
C         2  3  4  3        1
C         1  2  3  4        1
C
      DATA A / 4.0D0, 3*8D8, 3.0D0, 4.0D0, 2*8D8, 2.0D0, 3.0D0,
     $         4.0D0, 8D8, 1.0D0, 2.0D0, 3.0D0, 4.0D0 /
C
      PRINT 1000
      DO 100, I = 1, N
        PRINT 1010, (A(J,I), J = 1, I), (A(I,J), J = I + 1, N)
  100 CONTINUE
      PRINT 1020
      PRINT 1010, ((A(I,J), J = 1, N), I = 1, N)
      JOB = NOPIV
      CALL DCHDC (A, LDA, N, WORK, IPIVOT, JOB, INFO)
      IF (INFO .EQ. N) THEN
        PRINT 1030
        PRINT 1010, A(1,1), A(1,2), A(1,3), A(1,4)
        PRINT 1040,         A(2,2), A(2,3), A(2,4)
        PRINT 1050,                 A(3,3), A(3,4)
        PRINT 1060,                         A(4,4)
        ANULL = 0.0D0
        NULL = 1
        CALL DCHDD (A, LDA, N, X, ANULL, NULL, NZ, ANULL, ANULL,
     $              C, S, INFO)
        IF (INFO .EQ. 0) THEN
          PRINT 1070
          PRINT 1080, (C(I), S(I), I = 1, N)
        ELSE
          PRINT 1090
        END IF
      ELSE
        PRINT 1100
      END IF
C
 1000 FORMAT (1X, 'A in full form:')
 1010 FORMAT (4(3X, F7.3))
 1020 FORMAT (/1X, 'A in symmetric form (* in unused entries)')
 1030 FORMAT (/1X, 'Upper Cholesky factor:')
 1040 FORMAT (10X, 3(3X, F7.3))
 1050 FORMAT (20X, 2(3X, F7.3))
 1060 FORMAT (30X, 1(3X, F7.3))
 1070 FORMAT (/1X, 'Cosine', 3X, '  Sine')
 1080 FORMAT (1X, F6.3, 3X, F6.3)
 1090 FORMAT (/1X, 'A cannot be downdated.')
 1100 FORMAT (/1X, 'A is not positive definite.')
C
      END
 

Sample Output

 
 A in full form:
     4.000     3.000     2.000     1.000
     3.000     4.000     3.000     2.000
     2.000     3.000     4.000     3.000
     1.000     2.000     3.000     4.000



 A in symmetric form (* in unused entries)
     4.000     3.000     2.000     1.000
   *******     4.000     3.000     2.000
   *******   *******     4.000     3.000
   *******   *******   *******     4.000



 Upper Cholesky factor:
     2.000     1.500     1.000     0.500
               1.323     1.134     0.945
                         1.309     1.091
                                   1.291



 Cosine     Sine
  1.000    0.000
  1.000    0.000
  1.000    0.000
  1.000    0.000






Previous Next Contents Generated Index Doc Set Home