zpbcon.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 223 行 · 第 1/2 页
HTML
223 行
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL <a name="XERBLA.95"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>, <a name="ZDRSCL.95"></a><a href="zdrscl.f.html#ZDRSCL.1">ZDRSCL</a>, <a name="ZLACN2.95"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a>, <a name="ZLATBS.95"></a><a href="zlatbs.f.html#ZLATBS.1">ZLATBS</a>
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Intrinsic Functions ..
</span> INTRINSIC ABS, DBLE, DIMAG
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Statement Functions ..
</span> DOUBLE PRECISION CABS1
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Statement Function definitions ..
</span> CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Test the input parameters.
</span><span class="comment">*</span><span class="comment">
</span> INFO = 0
UPPER = <a name="LSAME.111"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'U'</span> )
IF( .NOT.UPPER .AND. .NOT.<a name="LSAME.112"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'L'</span> ) ) THEN
INFO = -1
ELSE IF( N.LT.0 ) THEN
INFO = -2
ELSE IF( KD.LT.0 ) THEN
INFO = -3
ELSE IF( LDAB.LT.KD+1 ) THEN
INFO = -5
ELSE IF( ANORM.LT.ZERO ) THEN
INFO = -6
END IF
IF( INFO.NE.0 ) THEN
CALL <a name="XERBLA.124"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>( <span class="string">'<a name="ZPBCON.124"></a><a href="zpbcon.f.html#ZPBCON.1">ZPBCON</a>'</span>, -INFO )
RETURN
END IF
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Quick return if possible
</span><span class="comment">*</span><span class="comment">
</span> RCOND = ZERO
IF( N.EQ.0 ) THEN
RCOND = ONE
RETURN
ELSE IF( ANORM.EQ.ZERO ) THEN
RETURN
END IF
<span class="comment">*</span><span class="comment">
</span> SMLNUM = <a name="DLAMCH.138"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>( <span class="string">'Safe minimum'</span> )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Estimate the 1-norm of the inverse.
</span><span class="comment">*</span><span class="comment">
</span> KASE = 0
NORMIN = <span class="string">'N'</span>
10 CONTINUE
CALL <a name="ZLACN2.145"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a>( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
IF( KASE.NE.0 ) THEN
IF( UPPER ) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Multiply by inv(U').
</span><span class="comment">*</span><span class="comment">
</span> CALL <a name="ZLATBS.151"></a><a href="zlatbs.f.html#ZLATBS.1">ZLATBS</a>( <span class="string">'Upper'</span>, <span class="string">'Conjugate transpose'</span>, <span class="string">'Non-unit'</span>,
$ NORMIN, N, KD, AB, LDAB, WORK, SCALEL, RWORK,
$ INFO )
NORMIN = <span class="string">'Y'</span>
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Multiply by inv(U).
</span><span class="comment">*</span><span class="comment">
</span> CALL <a name="ZLATBS.158"></a><a href="zlatbs.f.html#ZLATBS.1">ZLATBS</a>( <span class="string">'Upper'</span>, <span class="string">'No transpose'</span>, <span class="string">'Non-unit'</span>, NORMIN, N,
$ KD, AB, LDAB, WORK, SCALEU, RWORK, INFO )
ELSE
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Multiply by inv(L).
</span><span class="comment">*</span><span class="comment">
</span> CALL <a name="ZLATBS.164"></a><a href="zlatbs.f.html#ZLATBS.1">ZLATBS</a>( <span class="string">'Lower'</span>, <span class="string">'No transpose'</span>, <span class="string">'Non-unit'</span>, NORMIN, N,
$ KD, AB, LDAB, WORK, SCALEL, RWORK, INFO )
NORMIN = <span class="string">'Y'</span>
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Multiply by inv(L').
</span><span class="comment">*</span><span class="comment">
</span> CALL <a name="ZLATBS.170"></a><a href="zlatbs.f.html#ZLATBS.1">ZLATBS</a>( <span class="string">'Lower'</span>, <span class="string">'Conjugate transpose'</span>, <span class="string">'Non-unit'</span>,
$ NORMIN, N, KD, AB, LDAB, WORK, SCALEU, RWORK,
$ INFO )
END IF
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Multiply by 1/SCALE if doing so will not cause overflow.
</span><span class="comment">*</span><span class="comment">
</span> SCALE = SCALEL*SCALEU
IF( SCALE.NE.ONE ) THEN
IX = IZAMAX( N, WORK, 1 )
IF( SCALE.LT.CABS1( WORK( IX ) )*SMLNUM .OR. SCALE.EQ.ZERO )
$ GO TO 20
CALL <a name="ZDRSCL.182"></a><a href="zdrscl.f.html#ZDRSCL.1">ZDRSCL</a>( N, SCALE, WORK, 1 )
END IF
GO TO 10
END IF
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Compute the estimate of the reciprocal condition number.
</span><span class="comment">*</span><span class="comment">
</span> IF( AINVNM.NE.ZERO )
$ RCOND = ( ONE / AINVNM ) / ANORM
<span class="comment">*</span><span class="comment">
</span> 20 CONTINUE
<span class="comment">*</span><span class="comment">
</span> RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> End of <a name="ZPBCON.196"></a><a href="zpbcon.f.html#ZPBCON.1">ZPBCON</a>
</span><span class="comment">*</span><span class="comment">
</span> END
</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?