version 1.1, 2010/01/26 15:22:46
|
version 1.8, 2011/07/22 07:38:15
|
Line 1
|
Line 1
|
SUBROUTINE ZHETF2( UPLO, N, A, LDA, IPIV, INFO ) |
SUBROUTINE ZHETF2( UPLO, N, A, LDA, IPIV, INFO ) |
* |
* |
* -- LAPACK routine (version 3.2) -- |
* -- LAPACK routine (version 3.3.1) -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* November 2006 |
* -- April 2011 -- |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
CHARACTER UPLO |
CHARACTER UPLO |
Line 20
|
Line 20
|
* ZHETF2 computes the factorization of a complex Hermitian matrix A |
* ZHETF2 computes the factorization of a complex Hermitian matrix A |
* using the Bunch-Kaufman diagonal pivoting method: |
* using the Bunch-Kaufman diagonal pivoting method: |
* |
* |
* A = U*D*U' or A = L*D*L' |
* A = U*D*U**H or A = L*D*L**H |
* |
* |
* where U (or L) is a product of permutation and unit upper (lower) |
* where U (or L) is a product of permutation and unit upper (lower) |
* triangular matrices, U' is the conjugate transpose of U, and D is |
* triangular matrices, U**H is the conjugate transpose of U, and D is |
* Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. |
* Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. |
* |
* |
* This is the unblocked version of the algorithm, calling Level 2 BLAS. |
* This is the unblocked version of the algorithm, calling Level 2 BLAS. |
Line 88
|
Line 88
|
* J. Lewis, Boeing Computer Services Company |
* J. Lewis, Boeing Computer Services Company |
* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA |
* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA |
* |
* |
* If UPLO = 'U', then A = U*D*U', where |
* If UPLO = 'U', then A = U*D*U**H, where |
* U = P(n)*U(n)* ... *P(k)U(k)* ..., |
* U = P(n)*U(n)* ... *P(k)U(k)* ..., |
* i.e., U is a product of terms P(k)*U(k), where k decreases from n to |
* i.e., U is a product of terms P(k)*U(k), where k decreases from n to |
* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 |
* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 |
Line 105
|
Line 105
|
* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), |
* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), |
* and A(k,k), and v overwrites A(1:k-2,k-1:k). |
* and A(k,k), and v overwrites A(1:k-2,k-1:k). |
* |
* |
* If UPLO = 'L', then A = L*D*L', where |
* If UPLO = 'L', then A = L*D*L**H, where |
* L = P(1)*L(1)* ... *P(k)*L(k)* ..., |
* L = P(1)*L(1)* ... *P(k)*L(k)* ..., |
* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to |
* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to |
* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 |
* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 |
Line 179
|
Line 179
|
* |
* |
IF( UPPER ) THEN |
IF( UPPER ) THEN |
* |
* |
* Factorize A as U*D*U' using the upper triangle of A |
* Factorize A as U*D*U**H using the upper triangle of A |
* |
* |
* K is the main loop index, decreasing from N to 1 in steps of |
* K is the main loop index, decreasing from N to 1 in steps of |
* 1 or 2 |
* 1 or 2 |
Line 296
|
Line 296
|
* |
* |
* Perform a rank-1 update of A(1:k-1,1:k-1) as |
* Perform a rank-1 update of A(1:k-1,1:k-1) as |
* |
* |
* A := A - U(k)*D(k)*U(k)' = A - W(k)*1/D(k)*W(k)' |
* A := A - U(k)*D(k)*U(k)**H = A - W(k)*1/D(k)*W(k)**H |
* |
* |
R1 = ONE / DBLE( A( K, K ) ) |
R1 = ONE / DBLE( A( K, K ) ) |
CALL ZHER( UPLO, K-1, -R1, A( 1, K ), 1, A, LDA ) |
CALL ZHER( UPLO, K-1, -R1, A( 1, K ), 1, A, LDA ) |
Line 315
|
Line 315
|
* |
* |
* Perform a rank-2 update of A(1:k-2,1:k-2) as |
* Perform a rank-2 update of A(1:k-2,1:k-2) as |
* |
* |
* A := A - ( U(k-1) U(k) )*D(k)*( U(k-1) U(k) )' |
* A := A - ( U(k-1) U(k) )*D(k)*( U(k-1) U(k) )**H |
* = A - ( W(k-1) W(k) )*inv(D(k))*( W(k-1) W(k) )' |
* = A - ( W(k-1) W(k) )*inv(D(k))*( W(k-1) W(k) )**H |
* |
* |
IF( K.GT.2 ) THEN |
IF( K.GT.2 ) THEN |
* |
* |
Line 362
|
Line 362
|
* |
* |
ELSE |
ELSE |
* |
* |
* Factorize A as L*D*L' using the lower triangle of A |
* Factorize A as L*D*L**H using the lower triangle of A |
* |
* |
* K is the main loop index, increasing from 1 to N in steps of |
* K is the main loop index, increasing from 1 to N in steps of |
* 1 or 2 |
* 1 or 2 |
Line 482
|
Line 482
|
* |
* |
* Perform a rank-1 update of A(k+1:n,k+1:n) as |
* Perform a rank-1 update of A(k+1:n,k+1:n) as |
* |
* |
* A := A - L(k)*D(k)*L(k)' = A - W(k)*(1/D(k))*W(k)' |
* A := A - L(k)*D(k)*L(k)**H = A - W(k)*(1/D(k))*W(k)**H |
* |
* |
R1 = ONE / DBLE( A( K, K ) ) |
R1 = ONE / DBLE( A( K, K ) ) |
CALL ZHER( UPLO, N-K, -R1, A( K+1, K ), 1, |
CALL ZHER( UPLO, N-K, -R1, A( K+1, K ), 1, |
Line 500
|
Line 500
|
* |
* |
* Perform a rank-2 update of A(k+2:n,k+2:n) as |
* Perform a rank-2 update of A(k+2:n,k+2:n) as |
* |
* |
* A := A - ( L(k) L(k+1) )*D(k)*( L(k) L(k+1) )' |
* A := A - ( L(k) L(k+1) )*D(k)*( L(k) L(k+1) )**H |
* = A - ( W(k) W(k+1) )*inv(D(k))*( W(k) W(k+1) )' |
* = A - ( W(k) W(k+1) )*inv(D(k))*( W(k) W(k+1) )**H |
* |
* |
* where L(k) and L(k+1) are the k-th and (k+1)-th |
* where L(k) and L(k+1) are the k-th and (k+1)-th |
* columns of L |
* columns of L |