/home/abui...rfb_gett.f(3)
okay bestie, welcome to /home/abui...rfb_gett.f(3) β Library Functions Manual energy β and yes, we're keeping every detail intact. This is the DLARFB_GETT page, and it's giving very specific LAPACK realness π
β¨
π NAME π
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlarfb_gett.f
β¨ SYNOPSIS β¨
π§© Functions/Subroutines π§©
subroutine DLARFB_GETT (ident, m, n, k, t, ldt, a, lda, b, ldb, work,
ldwork)
DLARFB_GETT
π Function/Subroutine Documentation π
subroutine DLARFB_GETT (character ident, integer m, integer n, integer k,
double precision, dimension( ldt, * ) t, integer ldt, double precision,
dimension( lda, * ) a, integer lda, double precision, dimension( ldb, *
) b, integer ldb, double precision, dimension( ldwork, * ) work, integer
ldwork)
DLARFB_GETT
πΈ Purpose πΈ
okay so DLARFB_GETT applies a real Householder block reflector H from the left to a real (K+M)-by-N matrix composed of two block matrices: an upper trapezoidal K-by-N matrix A stored in the array A, and a rectangular M-by-(N-K) matrix B, stored in the array B. The block reflector H is stored in a compact WY-representation, where the elementary reflectors are in the arrays A, B and T. See Further Details section. π¦
π Parameters π
IDENTβIDENT is CHARACTER*1.- If
IDENT = not 'I', or not 'i', thenV1is unit lower-triangular and stored in the leftK-by-Kblock of the input matrixA. - If
IDENT = 'I'or'i', thenV1is an identity matrix and not stored. - See Further Details section.
- If
MβM is INTEGER.- The number of rows of the matrix
B. M >= 0.
- The number of rows of the matrix
NβN is INTEGER.- The number of columns of the matrices
AandB. N >= 0.
- The number of columns of the matrices
KβK is INTEGER.- The number or rows of the matrix
A. Kis also order of the matrixT, i.e. the number of elementary reflectors whose product defines the block reflector.0 <= K <= N.
- The number or rows of the matrix
TβT is DOUBLE PRECISION array, dimension (LDT,K).- The upper-triangular
K-by-KmatrixTin the representation of the block reflector.
- The upper-triangular
LDTβLDT is INTEGER.- The leading dimension of the array
T. LDT >= K.
- The leading dimension of the array
AβA is DOUBLE PRECISION array, dimension (LDA,N).- On entry:
- a) In the
K-by-Nupper-trapezoidal partA: input matrixA. - b) In the columns below the diagonal: columns of
V1(ones are not stored on the diagonal).
- a) In the
- On exit:
Ais overwritten by rectangularK-by-NproductH*A.
- See Further Details section.
- On entry:
LDAβLDB is INTEGER. Yes bestie, this page really saysLDBhere β I'm keeping it exactly as written. The leading dimension of the arrayA.LDA >= max(1,K).BβB is DOUBLE PRECISION array, dimension (LDB,N).- On entry:
- a) In the
M-by-(N-K)right block: input matrixB. - b) In the
M-by-Nleft block: columns ofV2.
- a) In the
- On exit:
Bis overwritten by rectangularM-by-NproductH*B.
- See Further Details section.
- On entry:
LDBβLDB is INTEGER.- The leading dimension of the array
B. LDB >= max(1,M).
- The leading dimension of the array
WORKβWORK is DOUBLE PRECISION array, dimension (LDWORK,max(K,N-K)).LDWORKβLDWORK is INTEGER.- The leading dimension of the array
WORK. LDWORK>=max(1,K).
- The leading dimension of the array
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π«Ά Contributors π«Ά
November 2020, Igor Kozachenko, Computer Science Division, University of California, Berkeley
π§ Further Details π§
Okay bestie, now let's get into the juicy details of the subroutine documentation. It's giving very detailed, very iconic. π
π (1) Description of the Algebraic Operation π
So, matrix A is a K-by-N matrix composed of two column block matrices: A1, which is K-by-K, and A2, which is K-by-(N-K). So like, A = ( A1, A2 ). And matrix B is an M-by-N matrix composed of two column block matrices: B1, which is M-by-K, and B2, which is M-by-(N-K). So B = ( B1, B2 ). Slay.
We perform the operation:
( A_out ) := H * ( A_in ) = ( I - V * T * V**T ) * ( A_in ) =
( B_out ) ( B_in ) ( B_in )
= ( I - ( V1 ) * T * ( V1**T, V2**T ) ) * ( A_in )
( V2 ) ( B_in )
On input:
a) ( A_in ) consists of two block columns: ( B_in )
( A_in ) = (( A1_in ) ( A2_in )) = (( A1_in ) ( A2_in ))
( B_in ) (( B1_in ) ( B2_in )) (( 0 ) ( B2_in )),
where the column blocks are:
( A1_in )is a K-by-K upper-triangular matrix stored in the upper triangular part of the arrayA(1:K,1:K).( B1_in )is an M-by-K rectangular ZERO matrix and not stored.( A2_in )is a K-by-(N-K) rectangular matrix stored in the arrayA(1:K,K+1:N).( B2_in )is an M-by-(N-K) rectangular matrix stored in the arrayB(1:M,K+1:N).
b) V = ( V1 ) over ( V2 )
V = ( V1 )
( V2 )
where:
- if
IDENT == 'I',V1is a K-by-K identity matrix, not stored; - if
IDENT != 'I',V1is a K-by-K unit lower-triangular matrix, stored in the lower-triangular part of the arrayA(1:K,1:K)(ones are not stored), andV2is an M-by-K rectangular matrix stored in the arrayB(1:M,1:K)(because on inputB1_inis a rectangular zero matrix that is not stored and the space is used to storeV2).
c) T is a K-by-K upper-triangular matrix stored in the array T(1:K,1:K).
On output:
a) ( A_out ) consists of two block columns: ( B_out )
( A_out ) = (( A1_out ) ( A2_out ))
( B_out ) (( B1_out ) ( B2_out )),
where the column blocks are:
( A1_out )is a K-by-K square matrix, or a K-by-K upper-triangular matrix, ifV1is an identity matrix.AiOutis stored in the arrayA(1:K,1:K).( B1_out )is an M-by-K rectangular matrix stored in the arrayB(1:M,K:N).( A2_out )is a K-by-(N-K) rectangular matrix stored in the arrayA(1:K,K+1:N).( B2_out )is an M-by-(N-K) rectangular matrix stored in the arrayB(1:M,K+1:N).
The operation above can be represented as the same operation on each block column:
( A1_out ) := H * ( A1_in ) = ( I - V * T * V**T ) * ( A1_in )
( B1_out ) ( 0 ) ( 0 )
( A2_out ) := H * ( A2_in ) = ( I - V * T * V**T ) * ( A2_in )
( B2_out ) ( B2_in ) ( B2_in )
If IDENT != 'I':
The computation for column block 1:
A1_out: = A1_in - V1*T*(V1**T)*A1_in
B1_out: = - V2*T*(V1**T)*A1_in
The computation for column block 2, which exists if N > K:
A2_out: = A2_in - V1*T*( (V1**T)*A2_in + (V2**T)*B2_in )
B2_out: = B2_in - V2*T*( (V1**T)*A2_in + (V2**T)*B2_in )
If IDENT == 'I':
The operation for column block 1:
A1_out: = A1_in - V1*T**A1_in
B1_out: = - V2*T**A1_in
The computation for column block 2, which exists if N > K:
A2_out: = A2_in - T*( A2_in + (V2**T)*B2_in )
B2_out: = B2_in - V2*T*( A2_in + (V2**T)*B2_in )
πΈ (2) Description of the Algorithmic Computation πΈ
In the first step, we compute column block 2, i.e. A2 and B2. Here, we need to use the K-by-(N-K) rectangular workspace matrix W2 that is of the same size as the matrix A2. W2 is stored in the array WORK(1:K,1:(N-K)).
In the second step, we compute column block 1, i.e. A1 and B1. Here, we need to use the K-by-K square workspace matrix W1 that is of the same size as the matrix A1. W1 is stored in the array WORK(1:K,1:K).
NOTE: Hence, in this routine, we need the workspace arrayWORKonly of sizeWORK(1:K,1:max(K,N-K))so it can hold bothW2from the first step andW1from the second step.
Case (A), when V1 is unit lower-triangular, i.e. IDENT != 'I', more computations than in the Case (B).
Here's the exact algorithm for Case (A):
if( IDENT != 'I' ) then
if ( N > K ) then
(First Step - column block 2)
col2_(1) W2: = A2
col2_(2) W2: = (V1**T) * W2 = (unit_lower_tr_of_(A1)**T) * W2
col2_(3) W2: = W2 + (V2**T) * B2 = W2 + (B1**T) * B2
col2_(4) W2: = T * W2
col2_(5) B2: = B2 - V2 * W2 = B2 - B1 * W2
col2_(6) W2: = V1 * W2 = unit_lower_tr_of_(A1) * W2
col2_(7) A2: = A2 - W2
else
(Second Step - column block 1)
col1_(1) W1: = A1
col1_(2) W1: = (V1**T) * W1 = (unit_lower_tr_of_(A1)**T) * W1
col1_(3) W1: = T * W1
col1_(4) B1: = - V2 * W1 = - B1 * W1
col1_(5) square W1: = V1 * W1 = unit_lower_tr_of_(A1) * W1
col1_(6) square A1: = A1 - W1
end if
end if
Case (B), when V1 is an identity matrix, i.e. IDENT == 'I', less computations than in the Case (A)
Here's the exact algorithm for Case (B):
if( IDENT == 'I' ) then
if ( N > K ) then
(First Step - column block 2)
col2_(1) W2: = A2
col2_(3) W2: = W2 + (V2**T) * B2 = W2 + (B1**T) * B2
col2_(4) W2: = T * W2
col2_(5) B2: = B2 - V2 * W2 = B2 - B1 * W2
col2_(7) A2: = A2 - W2
else
(Second Step - column block 1)
col1_(1) W1: = A1
col1_(3) W1: = T * W1
col1_(4) B1: = - V2 * W1 = - B1 * W1
col1_(6) upper-triangular_of_(A1): = A1 - W1
end if
end if
Combine these cases (A) and (B) together, this is the resulting algorithm:
if ( N > K ) then
(First Step - column block 2)
col2_(1) W2: = A2
if( IDENT != 'I' ) then
col2_(2) W2: = (V1**T) * W2
= (unit_lower_tr_of_(A1)**T) * W2
end if
col2_(3) W2: = W2 + (V2**T) * B2 = W2 + (B1**T) * B2]
col2_(4) W2: = T * W2
col2_(5) B2: = B2 - V2 * W2 = B2 - B1 * W2
if( IDENT != 'I' ) then
col2_(6) W2: = V1 * W2 = unit_lower_tr_of_(A1) * W2
end if
col2_(7) A2: = A2 - W2
else
(Second Step - column block 1)
col1_(1) W1: = A1
if( IDENT != 'I' ) then
col1_(2) W1: = (V1**T) * W1
= (unit_lower_tr_of_(A1)**T) * W1
end if
col1_(3) W1: = T * W1
col1_(4) B1: = - V2 * W1 = - B1 * W1
if( IDENT != 'I' ) then
col1_(5) square W1: = V1 * W1 = unit_lower_tr_of_(A1) * W1
col1_(6_a) below_diag_of_(A1): = - below_diag_of_(W1)
end if
col1_(6_b) up_tr_of_(A1): = up_tr_of_(A1) - up_tr_of_(W1)
end if
And that's the whole algorithm, bestie! β¨ The definition is at line 390 of file dlarfb_gett.f.
Author: Generated automatically by Doxygen for LAPACK from the source code.
This iconic page was brought to you by LAPACK Version 3.12.0, from the file /home/abui...rfb_gett.f(3). Stay slay, bestie! π
π
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms