1 *> \brief <b> ZPBSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZPBSV + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zpbsv.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zpbsv.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zpbsv.f">
21 * SUBROUTINE ZPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
23 * .. Scalar Arguments ..
25 * INTEGER INFO, KD, LDAB, LDB, N, NRHS
27 * .. Array Arguments ..
28 * COMPLEX*16 AB( LDAB, * ), B( LDB, * )
37 *> ZPBSV computes the solution to a complex system of linear equations
39 *> where A is an N-by-N Hermitian positive definite band matrix and X
40 *> and B are N-by-NRHS matrices.
42 *> The Cholesky decomposition is used to factor A as
43 *> A = U**H * U, if UPLO = 'U', or
44 *> A = L * L**H, if UPLO = 'L',
45 *> where U is an upper triangular band matrix, and L is a lower
46 *> triangular band matrix, with the same number of superdiagonals or
47 *> subdiagonals as A. The factored form of A is then used to solve the
48 *> system of equations A * X = B.
56 *> UPLO is CHARACTER*1
57 *> = 'U': Upper triangle of A is stored;
58 *> = 'L': Lower triangle of A is stored.
64 *> The number of linear equations, i.e., the order of the
71 *> The number of superdiagonals of the matrix A if UPLO = 'U',
72 *> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
78 *> The number of right hand sides, i.e., the number of columns
79 *> of the matrix B. NRHS >= 0.
84 *> AB is COMPLEX*16 array, dimension (LDAB,N)
85 *> On entry, the upper or lower triangle of the Hermitian band
86 *> matrix A, stored in the first KD+1 rows of the array. The
87 *> j-th column of A is stored in the j-th column of the array AB
89 *> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
90 *> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
91 *> See below for further details.
93 *> On exit, if INFO = 0, the triangular factor U or L from the
94 *> Cholesky factorization A = U**H *U or A = L*L**H of the band
95 *> matrix A, in the same storage format as A.
101 *> The leading dimension of the array AB. LDAB >= KD+1.
106 *> B is COMPLEX*16 array, dimension (LDB,NRHS)
107 *> On entry, the N-by-NRHS right hand side matrix B.
108 *> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
114 *> The leading dimension of the array B. LDB >= max(1,N).
120 *> = 0: successful exit
121 *> < 0: if INFO = -i, the i-th argument had an illegal value
122 *> > 0: if INFO = i, the leading minor of order i of A is not
123 *> positive definite, so the factorization could not be
124 *> completed, and the solution has not been computed.
130 *> \author Univ. of Tennessee
131 *> \author Univ. of California Berkeley
132 *> \author Univ. of Colorado Denver
135 *> \date November 2011
137 *> \ingroup complex16OTHERsolve
139 *> \par Further Details:
140 * =====================
144 *> The band storage scheme is illustrated by the following example, when
145 *> N = 6, KD = 2, and UPLO = 'U':
147 *> On entry: On exit:
149 *> * * a13 a24 a35 a46 * * u13 u24 u35 u46
150 *> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
151 *> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
153 *> Similarly, if UPLO = 'L' the format of A is as follows:
155 *> On entry: On exit:
157 *> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
158 *> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
159 *> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
161 *> Array elements marked * are not used by the routine.
164 * =====================================================================
165 SUBROUTINE ZPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
167 * -- LAPACK driver routine (version 3.4.0) --
168 * -- LAPACK is a software package provided by Univ. of Tennessee, --
169 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
172 * .. Scalar Arguments ..
174 INTEGER INFO, KD, LDAB, LDB, N, NRHS
176 * .. Array Arguments ..
177 COMPLEX*16 AB( LDAB, * ), B( LDB, * )
180 * =====================================================================
182 * .. External Functions ..
186 * .. External Subroutines ..
187 EXTERNAL XERBLA, ZPBTRF, ZPBTRS
189 * .. Intrinsic Functions ..
192 * .. Executable Statements ..
194 * Test the input parameters.
197 IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
199 ELSE IF( N.LT.0 ) THEN
201 ELSE IF( KD.LT.0 ) THEN
203 ELSE IF( NRHS.LT.0 ) THEN
205 ELSE IF( LDAB.LT.KD+1 ) THEN
207 ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
211 CALL XERBLA( 'ZPBSV ', -INFO )
215 * Compute the Cholesky factorization A = U**H *U or A = L*L**H.
217 CALL ZPBTRF( UPLO, N, KD, AB, LDAB, INFO )
220 * Solve the system A*X = B, overwriting B with X.
222 CALL ZPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )