1SPPTRF(1) LAPACK routine (version 3.1) SPPTRF(1)
2
3
4
6 SPPTRF - the Cholesky factorization of a real symmetric positive defi‐
7 nite matrix A stored in packed format
8
10 SUBROUTINE SPPTRF( UPLO, N, AP, INFO )
11
12 CHARACTER UPLO
13
14 INTEGER INFO, N
15
16 REAL AP( * )
17
19 SPPTRF computes the Cholesky factorization of a real symmetric positive
20 definite matrix A stored in packed format.
21
22 The factorization has the form
23 A = U**T * U, if UPLO = 'U', or
24 A = L * L**T, if UPLO = 'L',
25 where U is an upper triangular matrix and L is lower triangular.
26
27
29 UPLO (input) CHARACTER*1
30 = 'U': Upper triangle of A is stored;
31 = 'L': Lower triangle of A is stored.
32
33 N (input) INTEGER
34 The order of the matrix A. N >= 0.
35
36 AP (input/output) REAL array, dimension (N*(N+1)/2)
37 On entry, the upper or lower triangle of the symmetric matrix
38 A, packed columnwise in a linear array. The j-th column of A
39 is stored in the array AP as follows: if UPLO = 'U', AP(i +
40 (j-1)*j/2) = A(i,j) for 1<=i<=j; if UPLO = 'L', AP(i +
41 (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. See below for further
42 details.
43
44 On exit, if INFO = 0, the triangular factor U or L from the
45 Cholesky factorization A = U**T*U or A = L*L**T, in the same
46 storage format as A.
47
48 INFO (output) INTEGER
49 = 0: successful exit
50 < 0: if INFO = -i, the i-th argument had an illegal value
51 > 0: if INFO = i, the leading minor of order i is not positive
52 definite, and the factorization could not be completed.
53
55 The packed storage scheme is illustrated by the following example when
56 N = 4, UPLO = 'U':
57
58 Two-dimensional storage of the symmetric matrix A:
59
60 a11 a12 a13 a14
61 a22 a23 a24
62 a33 a34 (aij = aji)
63 a44
64
65 Packed storage of the upper triangle of A:
66
67 AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
68
69
70
71
72 LAPACK routine (version 3.1) November 2006 SPPTRF(1)