LAPACK++ 2024.05.31
LAPACK C++ API
Loading...
Searching...
No Matches
A = LQ factorization, triangle-pentagonal tiles

Functions

int64_t lapack::tplqt (int64_t m, int64_t n, int64_t l, int64_t mb, double *A, int64_t lda, double *B, int64_t ldb, double *T, int64_t ldt)
 
int64_t lapack::tplqt (int64_t m, int64_t n, int64_t l, int64_t mb, float *A, int64_t lda, float *B, int64_t ldb, float *T, int64_t ldt)
 
int64_t lapack::tplqt (int64_t m, int64_t n, int64_t l, int64_t mb, std::complex< double > *A, int64_t lda, std::complex< double > *B, int64_t ldb, std::complex< double > *T, int64_t ldt)
 Computes a blocked LQ factorization of a complex "triangular-pentagonal" matrix C, which is composed of a triangular block A and pentagonal block B, using the compact WY representation for Q.
 
int64_t lapack::tplqt (int64_t m, int64_t n, int64_t l, int64_t mb, std::complex< float > *A, int64_t lda, std::complex< float > *B, int64_t ldb, std::complex< float > *T, int64_t ldt)
 
int64_t lapack::tplqt2 (int64_t m, int64_t n, int64_t l, double *A, int64_t lda, double *B, int64_t ldb, double *T, int64_t ldt)
 
int64_t lapack::tplqt2 (int64_t m, int64_t n, int64_t l, float *A, int64_t lda, float *B, int64_t ldb, float *T, int64_t ldt)
 
int64_t lapack::tplqt2 (int64_t m, int64_t n, int64_t l, std::complex< double > *A, int64_t lda, std::complex< double > *B, int64_t ldb, std::complex< double > *T, int64_t ldt)
 Computes a LQ a factorization of a complex "triangular-pentagonal" matrix C, which is composed of a triangular block A and pentagonal block B, using the compact WY representation for Q.
 
int64_t lapack::tplqt2 (int64_t m, int64_t n, int64_t l, std::complex< float > *A, int64_t lda, std::complex< float > *B, int64_t ldb, std::complex< float > *T, int64_t ldt)
 
int64_t lapack::tpmlqt (lapack::Side side, lapack::Op trans, int64_t m, int64_t n, int64_t k, int64_t l, int64_t mb, double const *V, int64_t ldv, double const *T, int64_t ldt, double *A, int64_t lda, double *B, int64_t ldb)
 
int64_t lapack::tpmlqt (lapack::Side side, lapack::Op trans, int64_t m, int64_t n, int64_t k, int64_t l, int64_t mb, float const *V, int64_t ldv, float const *T, int64_t ldt, float *A, int64_t lda, float *B, int64_t ldb)
 
int64_t lapack::tpmlqt (lapack::Side side, lapack::Op trans, int64_t m, int64_t n, int64_t k, int64_t l, int64_t mb, std::complex< double > const *V, int64_t ldv, std::complex< double > const *T, int64_t ldt, std::complex< double > *A, int64_t lda, std::complex< double > *B, int64_t ldb)
 Applies a complex orthogonal matrix Q obtained from a "triangular-pentagonal" complex block reflector H to a general complex matrix C, which consists of two blocks A and B, as follows:
 
int64_t lapack::tpmlqt (lapack::Side side, lapack::Op trans, int64_t m, int64_t n, int64_t k, int64_t l, int64_t mb, std::complex< float > const *V, int64_t ldv, std::complex< float > const *T, int64_t ldt, std::complex< float > *A, int64_t lda, std::complex< float > *B, int64_t ldb)
 

Detailed Description

Function Documentation

◆ tplqt()

int64_t lapack::tplqt ( int64_t  m,
int64_t  n,
int64_t  l,
int64_t  mb,
std::complex< double > *  A,
int64_t  lda,
std::complex< double > *  B,
int64_t  ldb,
std::complex< double > *  T,
int64_t  ldt 
)

Computes a blocked LQ factorization of a complex "triangular-pentagonal" matrix C, which is composed of a triangular block A and pentagonal block B, using the compact WY representation for Q.

Overloaded versions are available for float, double, std::complex<float>, and std::complex<double>.

Since
LAPACK 3.7.0
Parameters
[in]mThe number of rows of the matrix B, and the order of the triangular matrix A. m >= 0.
[in]nThe number of columns of the matrix B. n >= 0.
[in]lThe number of rows of the lower trapezoidal part of B. min(m,n) >= l >= 0. See Further Details.
[in]mbThe block size to be used in the blocked QR. m >= mb >= 1.
[in,out]AThe m-by-m matrix A, stored in an lda-by-m array. On entry, the lower triangular m-by-m matrix A. On exit, the elements on and below the diagonal of the array contain the lower triangular matrix l.
[in]ldaThe leading dimension of the array A. lda >= max(1,m).
[in,out]BThe m-by-n matrix B, stored in an ldb-by-n array. On entry, the pentagonal m-by-n matrix B. The first n-l columns are rectangular, and the last l columns are lower trapezoidal. On exit, B contains the pentagonal matrix V. See Further Details.
[in]ldbThe leading dimension of the array B. ldb >= max(1,m).
[out]TThe mb-by-n matrix T, stored in an ldt-by-n array. The lower triangular block reflectors stored in compact form as a sequence of upper triangular blocks. See Further Details.
[in]ldtThe leading dimension of the array T. ldt >= mb.
Returns
= 0: successful exit
Further Details

The input matrix C is a m-by-(m+n) matrix

\[ C = [ A, B ] \]

where A is an lower triangular m-by-m matrix, and B is m-by-n pentagonal matrix consisting of a m-by-(n-l) rectangular matrix B1 left of a m-by-l upper trapezoidal matrix B2:

\[ B = [ B1, B2 ] \]

The lower trapezoidal matrix B2 consists of the first l columns of a m-by-m lower triangular matrix, where 0 <= l <= min(m,n). If l=0, B is rectangular m-by-n; if m=l=n, B is lower triangular.

The matrix W stores the elementary reflectors H(i) in the i-th row above the diagonal (of A) in the m-by-(m+n) input matrix C so that W can be represented as

\[ W = [ I, V ] \]

where I is m-by-m identity and V is m-by-n, same form as B.

Thus, all of information needed for W is contained on exit in B, which we call V above. Note that V has the same form as B; that is,

\[ V = [ V1, V2 ] \]

where V1 is m-by-(n-l) rectangular, V2 is m-by-l lower trapezoidal. The rows of V represent the vectors which define the H(i)'s.

The number of blocks is B = ceiling(m/mb), where each block is of order mb except for the last block, which is of order IB = m - (m-1)*mb. For each of the B blocks, a upper triangular block reflector factor is computed: T1, T2, ..., TB. The mb-by-mb (and IB-by-IB for the last block) T's are stored in the mb-by-n matrix T as

\[ T = [T1, T2, ..., TB]. \]

◆ tplqt2()

int64_t lapack::tplqt2 ( int64_t  m,
int64_t  n,
int64_t  l,
std::complex< double > *  A,
int64_t  lda,
std::complex< double > *  B,
int64_t  ldb,
std::complex< double > *  T,
int64_t  ldt 
)

Computes a LQ a factorization of a complex "triangular-pentagonal" matrix C, which is composed of a triangular block A and pentagonal block B, using the compact WY representation for Q.

Overloaded versions are available for float, double, std::complex<float>, and std::complex<double>.

Since
LAPACK 3.7.0
Parameters
[in]mThe total number of rows of the matrix B. m >= 0.
[in]nThe number of columns of the matrix B, and the order of the triangular matrix A. n >= 0.
[in]lThe number of rows of the lower trapezoidal part of B. min(m,n) >= l >= 0. See Further Details.
[in,out]AThe m-by-m matrix A, stored in an lda-by-m array. On entry, the lower triangular m-by-m matrix A. On exit, the elements on and below the diagonal of the array contain the lower triangular matrix l.
[in]ldaThe leading dimension of the array A. lda >= max(1,m).
[in,out]BThe m-by-n matrix B, stored in an ldb-by-n array. On entry, the pentagonal m-by-n matrix B. The first n-l columns are rectangular, and the last l columns are lower trapezoidal. On exit, B contains the pentagonal matrix V. See Further Details.
[in]ldbThe leading dimension of the array B. ldb >= max(1,m).
[out]TThe m-by-m matrix T, stored in an ldt-by-m array. The n-by-n upper triangular factor T of the block reflector. See Further Details.
[in]ldtThe leading dimension of the array T. ldt >= max(1,m)
Returns
= 0: successful exit
Further Details

The input matrix C is a m-by-(m+n) matrix

\[ C = [ A, B ] \]

where A is an lower triangular m-by-m matrix, and B is m-by-n pentagonal matrix consisting of a m-by-(n-l) rectangular matrix B1 left of a m-by-l upper trapezoidal matrix B2:

\[ B = [ B1, B2 ] \]

The lower trapezoidal matrix B2 consists of the first l columns of a n-by-n lower triangular matrix, where 0 <= l <= min(m,n). If l=0, B is rectangular m-by-n; if m=l=n, B is lower triangular.

The matrix W stores the elementary reflectors H(i) in the i-th row above the diagonal (of A) in the m-by-(m+n) input matrix C so that W can be represented as

\[ W = [ I, V ] \]

where I is m-by-m identity and V is m-by-n, same form as B.

Thus, all of information needed for W is contained on exit in B, which we call V above. Note that V has the same form as B; that is,

\[ V = [ V1, V2 ] \]

where V1 is m-by-(n-l) rectangular, V2 is m-by-l lower trapezoidal. The rows of V represent the vectors which define the H(i)'s. The (m+n)-by-(m+n) block reflector H is then given by

\[ H = I - W^T T W \]

where W^H is the conjugate transpose of W and T is the upper triangular factor of the block reflector.

◆ tpmlqt()

int64_t lapack::tpmlqt ( lapack::Side  side,
lapack::Op  trans,
int64_t  m,
int64_t  n,
int64_t  k,
int64_t  l,
int64_t  mb,
std::complex< double > const *  V,
int64_t  ldv,
std::complex< double > const *  T,
int64_t  ldt,
std::complex< double > *  A,
int64_t  lda,
std::complex< double > *  B,
int64_t  ldb 
)

Applies a complex orthogonal matrix Q obtained from a "triangular-pentagonal" complex block reflector H to a general complex matrix C, which consists of two blocks A and B, as follows:

  • side = Left, trans = NoTrans: \(Q C\)
  • side = Right, trans = NoTrans: \(C Q\)
  • side = Left, trans = ConjTrans: \(Q^H C\)
  • side = Right, trans = ConjTrans: \(C Q^H\)

Overloaded versions are available for float, double, std::complex<float>, and std::complex<double>.

Since
LAPACK 3.7.0
Parameters
[in]side
  • lapack::Side::Left: apply \(Q\) or \(Q^H\) from the Left;
  • lapack::Side::Right: apply \(Q\) or \(Q^H\) from the Right.
[in]trans
  • lapack::Op::NoTrans: No transpose, apply \(Q\);
  • lapack::Op::Trans: Transpose, apply \(Q^T\) (real only);
  • lapack::Op::ConjTrans: Conjugate-transpose, apply \(Q^H\).
[in]mThe number of rows of the matrix B. m >= 0.
[in]nThe number of columns of the matrix B. n >= 0.
[in]kThe number of elementary reflectors whose product defines the matrix Q.
[in]lThe order of the trapezoidal part of V. k >= l >= 0. See Further Details.
[in]mbThe block size used for the storage of T. k >= mb >= 1. This must be the same value of mb used to generate T in lapack::tplqt.
[in]VThe m-by-k matrix V, stored in an lda-by-k array. The i-th row must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by lapack::tplqt in B. See Further Details.
[in]ldvThe leading dimension of the array V. If side = Left, ldv >= max(1,m); if side = Right, ldv >= max(1,n).
[in]TThe mb-by-k matrix T, stored in an ldt-by-k array. The upper triangular factors of the block reflectors as returned by lapack::tplqt, stored as a mb-by-k matrix.
[in]ldtThe leading dimension of the array T. ldt >= mb.
[in,out]AIf side = Left, the k-by-n matrix A, stored in an lda-by-n array; if side = Right, the m-by-k matrix A, stored in an lda-by-k array. On exit, A is overwritten by the corresponding block of \(Q C\) or \(Q^H C\) or \(C Q\) or \(C Q^H\). See Further Details.
[in]ldaThe leading dimension of the array A. If side = Left, lda >= max(1,k); If side = Right, lda >= max(1,m).
[in,out]BThe m-by-n matrix B, stored in an ldb-by-n array. On entry, the m-by-n matrix B. On exit, B is overwritten by the corresponding block of \(Q C\) or \(Q^H C\) or \(C Q\) or \(C Q^H\). See Further Details.
[in]ldbThe leading dimension of the array B. ldb >= max(1,m).
Returns
= 0: successful exit
Further Details

The columns of the pentagonal matrix V contain the elementary reflectors H(1), H(2), ..., H(k); V is composed of a rectangular block V1 and a trapezoidal block V2:

\[ V = \begin{bmatrix} V1 & V2 \end{bmatrix}. \]

The size of the trapezoidal block V2 is determined by the parameter l, where 0 <= l <= k; V2 is lower trapezoidal, consisting of the first l rows of a k-by-k upper triangular matrix. If l=k, V2 is lower triangular; if l=0, there is no trapezoidal block, hence V = V1 is rectangular.

If side = Left:

\[ C = \begin{bmatrix} A \\ B \end{bmatrix}, \]

where A is k-by-n, B is m-by-n and V is k-by-m.

If side = Right:

\[ C = \begin{bmatrix} A & B \end{bmatrix}, \]

where A is m-by-k, B is m-by-n and V is k-by-n.

The unitary matrix Q is formed from V and T.