LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine dpptri ( character UPLO, integer N, double precision, dimension( * ) AP, integer INFO )

DPPTRI

Purpose:
``` DPPTRI computes the inverse of a real symmetric positive definite
matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
computed by DPPTRF.```
Parameters
 [in] UPLO ``` UPLO is CHARACTER*1 = 'U': Upper triangular factor is stored in AP; = 'L': Lower triangular factor is stored in AP.``` [in] N ``` N is INTEGER The order of the matrix A. N >= 0.``` [in,out] AP ``` AP is DOUBLE PRECISION array, dimension (N*(N+1)/2) On entry, the triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, packed columnwise as a linear array. The j-th column of U or L is stored in the array AP as follows: if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j; if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n. On exit, the upper or lower triangle of the (symmetric) inverse of A, overwriting the input factor U or L.``` [out] INFO ``` INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value > 0: if INFO = i, the (i,i) element of the factor U or L is zero, and the inverse could not be computed.```
Date
November 2011

Definition at line 95 of file dpptri.f.

95 *
96 * -- LAPACK computational routine (version 3.4.0) --
97 * -- LAPACK is a software package provided by Univ. of Tennessee, --
98 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
99 * November 2011
100 *
101 * .. Scalar Arguments ..
102  CHARACTER uplo
103  INTEGER info, n
104 * ..
105 * .. Array Arguments ..
106  DOUBLE PRECISION ap( * )
107 * ..
108 *
109 * =====================================================================
110 *
111 * .. Parameters ..
112  DOUBLE PRECISION one
113  parameter ( one = 1.0d+0 )
114 * ..
115 * .. Local Scalars ..
116  LOGICAL upper
117  INTEGER j, jc, jj, jjn
118  DOUBLE PRECISION ajj
119 * ..
120 * .. External Functions ..
121  LOGICAL lsame
122  DOUBLE PRECISION ddot
123  EXTERNAL lsame, ddot
124 * ..
125 * .. External Subroutines ..
126  EXTERNAL dscal, dspr, dtpmv, dtptri, xerbla
127 * ..
128 * .. Executable Statements ..
129 *
130 * Test the input parameters.
131 *
132  info = 0
133  upper = lsame( uplo, 'U' )
134  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
135  info = -1
136  ELSE IF( n.LT.0 ) THEN
137  info = -2
138  END IF
139  IF( info.NE.0 ) THEN
140  CALL xerbla( 'DPPTRI', -info )
141  RETURN
142  END IF
143 *
144 * Quick return if possible
145 *
146  IF( n.EQ.0 )
147  \$ RETURN
148 *
149 * Invert the triangular Cholesky factor U or L.
150 *
151  CALL dtptri( uplo, 'Non-unit', n, ap, info )
152  IF( info.GT.0 )
153  \$ RETURN
154 *
155  IF( upper ) THEN
156 *
157 * Compute the product inv(U) * inv(U)**T.
158 *
159  jj = 0
160  DO 10 j = 1, n
161  jc = jj + 1
162  jj = jj + j
163  IF( j.GT.1 )
164  \$ CALL dspr( 'Upper', j-1, one, ap( jc ), 1, ap )
165  ajj = ap( jj )
166  CALL dscal( j, ajj, ap( jc ), 1 )
167  10 CONTINUE
168 *
169  ELSE
170 *
171 * Compute the product inv(L)**T * inv(L).
172 *
173  jj = 1
174  DO 20 j = 1, n
175  jjn = jj + n - j + 1
176  ap( jj ) = ddot( n-j+1, ap( jj ), 1, ap( jj ), 1 )
177  IF( j.LT.n )
178  \$ CALL dtpmv( 'Lower', 'Transpose', 'Non-unit', n-j,
179  \$ ap( jjn ), ap( jj+1 ), 1 )
180  jj = jjn
181  20 CONTINUE
182  END IF
183 *
184  RETURN
185 *
186 * End of DPPTRI
187 *
double precision function ddot(N, DX, INCX, DY, INCY)
DDOT
Definition: ddot.f:53
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine dscal(N, DA, DX, INCX)
DSCAL
Definition: dscal.f:55
subroutine dspr(UPLO, N, ALPHA, X, INCX, AP)
DSPR
Definition: dspr.f:129
subroutine dtptri(UPLO, DIAG, N, AP, INFO)
DTPTRI
Definition: dtptri.f:119
subroutine dtpmv(UPLO, TRANS, DIAG, N, AP, X, INCX)
DTPMV
Definition: dtpmv.f:144
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function: