![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b ZPTSV 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download ZPTSV + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zptsv.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zptsv.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zptsv.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * SUBROUTINE ZPTSV( N, NRHS, D, E, B, LDB, INFO ) 00022 * 00023 * .. Scalar Arguments .. 00024 * INTEGER INFO, LDB, N, NRHS 00025 * .. 00026 * .. Array Arguments .. 00027 * DOUBLE PRECISION D( * ) 00028 * COMPLEX*16 B( LDB, * ), E( * ) 00029 * .. 00030 * 00031 * 00032 *> \par Purpose: 00033 * ============= 00034 *> 00035 *> \verbatim 00036 *> 00037 *> ZPTSV computes the solution to a complex system of linear equations 00038 *> A*X = B, where A is an N-by-N Hermitian positive definite tridiagonal 00039 *> matrix, and X and B are N-by-NRHS matrices. 00040 *> 00041 *> A is factored as A = L*D*L**H, and the factored form of A is then 00042 *> used to solve the system of equations. 00043 *> \endverbatim 00044 * 00045 * Arguments: 00046 * ========== 00047 * 00048 *> \param[in] N 00049 *> \verbatim 00050 *> N is INTEGER 00051 *> The order of the matrix A. N >= 0. 00052 *> \endverbatim 00053 *> 00054 *> \param[in] NRHS 00055 *> \verbatim 00056 *> NRHS is INTEGER 00057 *> The number of right hand sides, i.e., the number of columns 00058 *> of the matrix B. NRHS >= 0. 00059 *> \endverbatim 00060 *> 00061 *> \param[in,out] D 00062 *> \verbatim 00063 *> D is DOUBLE PRECISION array, dimension (N) 00064 *> On entry, the n diagonal elements of the tridiagonal matrix 00065 *> A. On exit, the n diagonal elements of the diagonal matrix 00066 *> D from the factorization A = L*D*L**H. 00067 *> \endverbatim 00068 *> 00069 *> \param[in,out] E 00070 *> \verbatim 00071 *> E is COMPLEX*16 array, dimension (N-1) 00072 *> On entry, the (n-1) subdiagonal elements of the tridiagonal 00073 *> matrix A. On exit, the (n-1) subdiagonal elements of the 00074 *> unit bidiagonal factor L from the L*D*L**H factorization of 00075 *> A. E can also be regarded as the superdiagonal of the unit 00076 *> bidiagonal factor U from the U**H*D*U factorization of A. 00077 *> \endverbatim 00078 *> 00079 *> \param[in,out] B 00080 *> \verbatim 00081 *> B is COMPLEX*16 array, dimension (LDB,NRHS) 00082 *> On entry, the N-by-NRHS right hand side matrix B. 00083 *> On exit, if INFO = 0, the N-by-NRHS solution matrix X. 00084 *> \endverbatim 00085 *> 00086 *> \param[in] LDB 00087 *> \verbatim 00088 *> LDB is INTEGER 00089 *> The leading dimension of the array B. LDB >= max(1,N). 00090 *> \endverbatim 00091 *> 00092 *> \param[out] INFO 00093 *> \verbatim 00094 *> INFO is INTEGER 00095 *> = 0: successful exit 00096 *> < 0: if INFO = -i, the i-th argument had an illegal value 00097 *> > 0: if INFO = i, the leading minor of order i is not 00098 *> positive definite, and the solution has not been 00099 *> computed. The factorization has not been completed 00100 *> unless i = N. 00101 *> \endverbatim 00102 * 00103 * Authors: 00104 * ======== 00105 * 00106 *> \author Univ. of Tennessee 00107 *> \author Univ. of California Berkeley 00108 *> \author Univ. of Colorado Denver 00109 *> \author NAG Ltd. 00110 * 00111 *> \date November 2011 00112 * 00113 *> \ingroup complex16OTHERcomputational 00114 * 00115 * ===================================================================== 00116 SUBROUTINE ZPTSV( N, NRHS, D, E, B, LDB, INFO ) 00117 * 00118 * -- LAPACK computational routine (version 3.4.0) -- 00119 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00120 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00121 * November 2011 00122 * 00123 * .. Scalar Arguments .. 00124 INTEGER INFO, LDB, N, NRHS 00125 * .. 00126 * .. Array Arguments .. 00127 DOUBLE PRECISION D( * ) 00128 COMPLEX*16 B( LDB, * ), E( * ) 00129 * .. 00130 * 00131 * ===================================================================== 00132 * 00133 * .. External Subroutines .. 00134 EXTERNAL XERBLA, ZPTTRF, ZPTTRS 00135 * .. 00136 * .. Intrinsic Functions .. 00137 INTRINSIC MAX 00138 * .. 00139 * .. Executable Statements .. 00140 * 00141 * Test the input parameters. 00142 * 00143 INFO = 0 00144 IF( N.LT.0 ) THEN 00145 INFO = -1 00146 ELSE IF( NRHS.LT.0 ) THEN 00147 INFO = -2 00148 ELSE IF( LDB.LT.MAX( 1, N ) ) THEN 00149 INFO = -6 00150 END IF 00151 IF( INFO.NE.0 ) THEN 00152 CALL XERBLA( 'ZPTSV ', -INFO ) 00153 RETURN 00154 END IF 00155 * 00156 * Compute the L*D*L**H (or U**H*D*U) factorization of A. 00157 * 00158 CALL ZPTTRF( N, D, E, INFO ) 00159 IF( INFO.EQ.0 ) THEN 00160 * 00161 * Solve the system A*X = B, overwriting B with X. 00162 * 00163 CALL ZPTTRS( 'Lower', N, NRHS, D, E, B, LDB, INFO ) 00164 END IF 00165 RETURN 00166 * 00167 * End of ZPTSV 00168 * 00169 END