Mercurial > octave-nkf
comparison libcruft/lapack/dpotri.f @ 5340:15843d76156d
[project @ 2005-05-06 16:26:58 by jwe]
author | jwe |
---|---|
date | Fri, 06 May 2005 16:26:59 +0000 |
parents | |
children | 68db500cb558 |
comparison
equal
deleted
inserted
replaced
5339:4266ef7972b2 | 5340:15843d76156d |
---|---|
1 SUBROUTINE DPOTRI( UPLO, N, A, LDA, INFO ) | |
2 * | |
3 * -- LAPACK routine (version 3.0) -- | |
4 * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., | |
5 * Courant Institute, Argonne National Lab, and Rice University | |
6 * March 31, 1993 | |
7 * | |
8 * .. Scalar Arguments .. | |
9 CHARACTER UPLO | |
10 INTEGER INFO, LDA, N | |
11 * .. | |
12 * .. Array Arguments .. | |
13 DOUBLE PRECISION A( LDA, * ) | |
14 * .. | |
15 * | |
16 * Purpose | |
17 * ======= | |
18 * | |
19 * DPOTRI computes the inverse of a real symmetric positive definite | |
20 * matrix A using the Cholesky factorization A = U**T*U or A = L*L**T | |
21 * computed by DPOTRF. | |
22 * | |
23 * Arguments | |
24 * ========= | |
25 * | |
26 * UPLO (input) CHARACTER*1 | |
27 * = 'U': Upper triangle of A is stored; | |
28 * = 'L': Lower triangle of A is stored. | |
29 * | |
30 * N (input) INTEGER | |
31 * The order of the matrix A. N >= 0. | |
32 * | |
33 * A (input/output) DOUBLE PRECISION array, dimension (LDA,N) | |
34 * On entry, the triangular factor U or L from the Cholesky | |
35 * factorization A = U**T*U or A = L*L**T, as computed by | |
36 * DPOTRF. | |
37 * On exit, the upper or lower triangle of the (symmetric) | |
38 * inverse of A, overwriting the input factor U or L. | |
39 * | |
40 * LDA (input) INTEGER | |
41 * The leading dimension of the array A. LDA >= max(1,N). | |
42 * | |
43 * INFO (output) INTEGER | |
44 * = 0: successful exit | |
45 * < 0: if INFO = -i, the i-th argument had an illegal value | |
46 * > 0: if INFO = i, the (i,i) element of the factor U or L is | |
47 * zero, and the inverse could not be computed. | |
48 * | |
49 * ===================================================================== | |
50 * | |
51 * .. External Functions .. | |
52 LOGICAL LSAME | |
53 EXTERNAL LSAME | |
54 * .. | |
55 * .. External Subroutines .. | |
56 EXTERNAL DLAUUM, DTRTRI, XERBLA | |
57 * .. | |
58 * .. Intrinsic Functions .. | |
59 INTRINSIC MAX | |
60 * .. | |
61 * .. Executable Statements .. | |
62 * | |
63 * Test the input parameters. | |
64 * | |
65 INFO = 0 | |
66 IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN | |
67 INFO = -1 | |
68 ELSE IF( N.LT.0 ) THEN | |
69 INFO = -2 | |
70 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN | |
71 INFO = -4 | |
72 END IF | |
73 IF( INFO.NE.0 ) THEN | |
74 CALL XERBLA( 'DPOTRI', -INFO ) | |
75 RETURN | |
76 END IF | |
77 * | |
78 * Quick return if possible | |
79 * | |
80 IF( N.EQ.0 ) | |
81 $ RETURN | |
82 * | |
83 * Invert the triangular Cholesky factor U or L. | |
84 * | |
85 CALL DTRTRI( UPLO, 'Non-unit', N, A, LDA, INFO ) | |
86 IF( INFO.GT.0 ) | |
87 $ RETURN | |
88 * | |
89 * Form inv(U)*inv(U)' or inv(L)'*inv(L). | |
90 * | |
91 CALL DLAUUM( UPLO, N, A, LDA, INFO ) | |
92 * | |
93 RETURN | |
94 * | |
95 * End of DPOTRI | |
96 * | |
97 END |