2
SUBROUTINE DPOFA (A, LDA, N, INFO)
3
C***BEGIN PROLOGUE DPOFA
4
C***PURPOSE Factor a real symmetric positive definite matrix.
5
C***LIBRARY SLATEC (LINPACK)
7
C***TYPE DOUBLE PRECISION (SPOFA-S, DPOFA-D, CPOFA-C)
8
C***KEYWORDS LINEAR ALGEBRA, LINPACK, MATRIX FACTORIZATION,
10
C***AUTHOR Moler, C. B., (U. of New Mexico)
13
C DPOFA factors a double precision symmetric positive definite
16
C DPOFA is usually called by DPOCO, but it can be called
17
C directly with a saving in time if RCOND is not needed.
18
C (time for DPOCO) = (1 + 18/N)*(time for DPOFA) .
22
C A DOUBLE PRECISION(LDA, N)
23
C the symmetric matrix to be factored. Only the
24
C diagonal and upper triangle are used.
27
C the leading dimension of the array A .
30
C the order of the matrix A .
34
C A an upper triangular matrix R so that A = TRANS(R)*R
35
C where TRANS(R) is the transpose.
36
C The strict lower triangle is unaltered.
37
C If INFO .NE. 0 , the factorization is not complete.
40
C = 0 for normal return.
41
C = K signals an error condition. The leading minor
42
C of order K is not positive definite.
44
C***REFERENCES J. J. Dongarra, J. R. Bunch, C. B. Moler, and G. W.
45
C Stewart, LINPACK Users' Guide, SIAM, 1979.
46
C***ROUTINES CALLED DDOT
47
C***REVISION HISTORY (YYMMDD)
49
C 890531 Changed all specific intrinsics to generic. (WRB)
50
C 890831 Modified array declarations. (WRB)
51
C 890831 REVISION DATE from Version 3.2
52
C 891214 Prologue converted to Version 4.0 format. (BAB)
53
C 900326 Removed duplicate information from DESCRIPTION section.
55
C 920501 Reformatted the REFERENCES section. (WRB)
56
C***END PROLOGUE DPOFA
58
DOUBLE PRECISION A(LDA,*)
60
DOUBLE PRECISION DDOT,T
63
C***FIRST EXECUTABLE STATEMENT DPOFA
68
IF (JM1 .LT. 1) GO TO 20
70
T = A(K,J) - DDOT(K-1,A(1,K),1,A(1,J),1)
77
IF (S .LE. 0.0D0) GO TO 40