-
template<typename T>
void larft(char *direct, char *storev, integer *n, integer *k, T *v, integer *ldv, T *tau, T *t, integer *ldt)# Triangular factor of a block reflector.
Purpose:
Formation of the triangular factor T of a real block reflector H of order n, which is defined as a product of k elementary reflectors. If direct = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular; If direct = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular. If storev = 'C', the vector which defines the elementary reflector H(i) is stored in the i-th column of the array V, and H = I - V * T * V**T If storev = 'R', the vector which defines the elementary reflector H(i) is stored in the i-th row of the array V, and H = I - V**T * T * V
Further Details
The shape of the matrix V and the storage of the vectors which define the H(i) is best illustrated by the following example with n = 5 and k = 3. The elements equal to 1 are not stored. direct = 'F' and storev = 'C': direct = 'F' and storev = 'R': V = ( 1) V = ( 1 v1 v1 v1 v1) ( v1 1) ( 1 v2 v2 v2) ( v1 v2 1) ( 1 v3 v3) ( v1 v2 v3) ( v1 v2 v3) direct = 'B' and storev = 'C': direct = 'B' and storev = 'R': V = ( v1 v2 v3) V = ( v1 v1 1) ( v1 v2 v3) ( v2 v2 v2 1) ( 1 v2 v3) ( v3 v3 v3 v3 1) ( 1 v3) ( 1)
- Parameters:
direct – [in]
direct is char*
Specifies the order in which the elementary reflectors are multiplied to form the block reflector:
= ‘F’: H = H(1) H(2) … H(k) (Forward)
= ‘B’: H = H(k) … H(2) H(1) (Backward)
storev – [in]
storev is char*
Specifies how the vectors which define the elementary reflectors are stored (see also Further Details):
= ‘C’: columnwise
= ‘R’: rowwise
n – [in]
n is integer*
The order of the block reflector H. n >= 0.
k – [in]
k is integer*
The order of the triangular factor T (= the number of elementary reflectors). K >= 1.
v – [in]
v is float/double/COMPLEX/COMPLEX*16 array, dimension
(ldv,k) if storev = ‘C’
(ldv,k) if storev = ‘R’
The matrix v. See further details.
ldv – [in]
ldv is integer*
The leading dimension of the array V.
If storev = ‘C’, ldv >= fla_max(1,n); if storev = ‘R’, ldv >= k.tau – [in]
tau is float/double/COMPLEX/COMPLEX*16 array, dimension (k)
tau(i) must contain the scalar factor of the elementary reflector H(i).
t – [out]
t is float/double/COMPLEX/COMPLEX*16 array, dimension (ldt,k)
The k by k triangular factor T of the block reflector.
If direct = ‘F’, T is upper triangular; if direct = ‘B’, T is lower triangular. The rest of the array is not used.ldt – [in]
ldt is integer*
The leading dimension of the array T. ldt >= k.