LAPACK++
LAPACK C++ API
|
Functions | |
int64_t | lapack::hesv (lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< double > *A, int64_t lda, int64_t *ipiv, std::complex< double > *B, int64_t ldb) |
Computes the solution to a system of linear equations \(A X = B\), where A is an n-by-n Hermitian matrix and X and B are n-by-nrhs matrices. More... | |
int64_t | lapack::hesv (lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< float > *A, int64_t lda, int64_t *ipiv, std::complex< float > *B, int64_t ldb) |
int64_t | lapack::hesv_aa (lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< double > *A, int64_t lda, int64_t *ipiv, std::complex< double > *B, int64_t ldb) |
Computes the solution to a system of linear equations \(A X = B\), where A is an n-by-n Hermitian matrix and X and B are n-by-nrhs matrices. More... | |
int64_t | lapack::hesv_aa (lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< float > *A, int64_t lda, int64_t *ipiv, std::complex< float > *B, int64_t ldb) |
int64_t | lapack::hesv_rk (lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< double > *A, int64_t lda, std::complex< double > *E, int64_t *ipiv, std::complex< double > *B, int64_t ldb) |
Computes the solution to a system of linear equations. More... | |
int64_t | lapack::hesv_rk (lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< float > *A, int64_t lda, std::complex< float > *E, int64_t *ipiv, std::complex< float > *B, int64_t ldb) |
int64_t | lapack::hesv_rook (lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< double > *A, int64_t lda, int64_t *ipiv, std::complex< double > *B, int64_t ldb) |
int64_t | lapack::hesv_rook (lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< float > *A, int64_t lda, int64_t *ipiv, std::complex< float > *B, int64_t ldb) |
int64_t | lapack::hesvx (lapack::Factored fact, lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< double > const *A, int64_t lda, std::complex< double > *AF, int64_t ldaf, int64_t *ipiv, std::complex< double > const *B, int64_t ldb, std::complex< double > *X, int64_t ldx, double *rcond, double *ferr, double *berr) |
Uses the diagonal pivoting factorization to compute the solution to a system of linear equations \(A X = B\), where A is an n-by-n Hermitian matrix and X and B are n-by-nrhs matrices. More... | |
int64_t | lapack::hesvx (lapack::Factored fact, lapack::Uplo uplo, int64_t n, int64_t nrhs, std::complex< float > const *A, int64_t lda, std::complex< float > *AF, int64_t ldaf, int64_t *ipiv, std::complex< float > const *B, int64_t ldb, std::complex< float > *X, int64_t ldx, float *rcond, float *ferr, float *berr) |
int64_t lapack::hesv | ( | lapack::Uplo | uplo, |
int64_t | n, | ||
int64_t | nrhs, | ||
std::complex< double > * | A, | ||
int64_t | lda, | ||
int64_t * | ipiv, | ||
std::complex< double > * | B, | ||
int64_t | ldb | ||
) |
Computes the solution to a system of linear equations \(A X = B\), where A is an n-by-n Hermitian matrix and X and B are n-by-nrhs matrices.
The diagonal pivoting method is used to factor A as \(A = U D U^H\) if uplo = Upper, or \(A = L D L^H\) if uplo = Lower, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then used to solve the system of equations \(A X = B\).
Overloaded versions are available for float
, double
, std::complex<float>
, and std::complex<double>
.
[in] | uplo |
|
[in] | n | The number of linear equations, i.e., the order of the matrix A. n >= 0. |
[in] | nrhs | The number of right hand sides, i.e., the number of columns of the matrix B. nrhs >= 0. |
[in,out] | A | The n-by-n matrix A, stored in an lda-by-n array. On entry, the Hermitian matrix A.
|
[in] | lda | The leading dimension of the array A. lda >= max(1,n). |
[out] | ipiv | The vector ipiv of length n. Details of the interchanges and the block structure of D, as determined by lapack::hetrf . If ipiv(k) > 0, then rows and columns k and ipiv(k) were interchanged, and D(k,k) is a 1-by-1 diagonal block.
|
[in,out] | B | The n-by-nrhs matrix B, stored in an ldb-by-nrhs array. On entry, the n-by-nrhs right hand side matrix B. On successful exit, the n-by-nrhs solution matrix X. |
[in] | ldb | The leading dimension of the array B. ldb >= max(1,n). |
int64_t lapack::hesv_aa | ( | lapack::Uplo | uplo, |
int64_t | n, | ||
int64_t | nrhs, | ||
std::complex< double > * | A, | ||
int64_t | lda, | ||
int64_t * | ipiv, | ||
std::complex< double > * | B, | ||
int64_t | ldb | ||
) |
Computes the solution to a system of linear equations \(A X = B\), where A is an n-by-n Hermitian matrix and X and B are n-by-nrhs matrices.
Aasen's algorithm is used to factor A as \(A = U T U^H\) if uplo = Upper, or \(A = L T L^H\) if uplo = Lower, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and T is Hermitian tridiagonal. The factored form of A is then used to solve the system of equations \(A X = B\).
Overloaded versions are available for float
, double
, std::complex<float>
, and std::complex<double>
. For real matrices, this is an alias for lapack::sysv_aa
. For complex symmetric matrices, see lapack::sysv_aa
.
[in] | uplo |
|
[in] | n | The number of linear equations, i.e., the order of the matrix A. n >= 0. |
[in] | nrhs | The number of right hand sides, i.e., the number of columns of the matrix B. nrhs >= 0. |
[in,out] | A | The n-by-n matrix A, stored in an lda-by-n array. On entry, the Hermitian matrix A.
|
[in] | lda | The leading dimension of the array A. lda >= max(1,n). |
[out] | ipiv | The vector ipiv of length n. On exit, it contains the details of the interchanges, i.e., the row and column k of A were interchanged with the row and column ipiv(k). |
[in,out] | B | The n-by-nrhs matrix B, stored in an ldb-by-nrhs array. On entry, the n-by-nrhs right hand side matrix B. On successful exit, the n-by-nrhs solution matrix X. |
[in] | ldb | The leading dimension of the array B. ldb >= max(1,n). |
int64_t lapack::hesv_rk | ( | lapack::Uplo | uplo, |
int64_t | n, | ||
int64_t | nrhs, | ||
std::complex< double > * | A, | ||
int64_t | lda, | ||
std::complex< double > * | E, | ||
int64_t * | ipiv, | ||
std::complex< double > * | B, | ||
int64_t | ldb | ||
) |
Computes the solution to a system of linear equations.
\[ A X = B, \]
where A is an n-by-n Hermitian matrix and X and B are n-by-nrhs matrices.
The bounded Bunch-Kaufman (rook) diagonal pivoting method is used to factor A as \(A = P U D U^H P^T,\) if uplo = Upper, or \(A = P L D L^H P^T,\) if uplo = Lower, where U (or L) is unit upper (or lower) triangular matrix, \(U^H\) (or \(L^H\)) is the conjugate of U (or L), P is a permutation matrix, \(P^T\) is the transpose of P, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
lapack::hetrf_rk
is called to compute the factorization of a Hermitian matrix. The factored form of A is then used to solve the system of equations \(A X = B\) by calling lapack::hetrs_rk
.
Overloaded versions are available for float
, double
, std::complex<float>
, and std::complex<double>
. For real matrices, this is an alias for lapack::sysv_rk
. For complex symmetric matrices, see lapack::sysv_rk
.
[in] | uplo | Whether the upper or lower triangular part of the Hermitian matrix A is stored:
|
[in] | n | The number of linear equations, i.e., the order of the matrix A. n >= 0. |
[in] | nrhs | The number of right hand sides, i.e., the number of columns of the matrix B. nrhs >= 0. |
[in,out] | A | The n-by-n matrix A, stored in an lda-by-n array.
|
[in] | lda | The leading dimension of the array A. lda >= max(1,n). |
[out] | E | The vector E of length n. On exit, contains the output computed by the factorization routine lapack::hetrf_rk , i.e. the superdiagonal (or subdiagonal) elements of the Hermitian block diagonal matrix D with 1-by-1 or 2-by-2 diagonal blocks, where
|
[out] | ipiv | The vector ipiv of length n. Details of the interchanges and the block structure of D, as determined by lapack::hetrf_rk . For more info see the description of lapack::hetrf_rk . |
[in,out] | B | The n-by-nrhs matrix B, stored in an ldb-by-nrhs array. On entry, the n-by-nrhs right hand side matrix B. On successful exit, the n-by-nrhs solution matrix X. |
[in] | ldb | The leading dimension of the array B. ldb >= max(1,n). |
Therefore D(k,k) is exactly zero, and superdiagonal elements of column k of U (or subdiagonal elements of column k of L ) are all zeros. The factorization has been completed, but the block diagonal matrix D is exactly singular, and division by zero will occur if it is used to solve a system of equations.
NOTE: info only stores the first occurrence of a singularity, any subsequent occurrence of singularity is not stored in info even though the factorization always completes.
int64_t lapack::hesv_rook | ( | lapack::Uplo | uplo, |
int64_t | n, | ||
int64_t | nrhs, | ||
std::complex< double > * | A, | ||
int64_t | lda, | ||
int64_t * | ipiv, | ||
std::complex< double > * | B, | ||
int64_t | ldb | ||
) |
int64_t lapack::hesvx | ( | lapack::Factored | fact, |
lapack::Uplo | uplo, | ||
int64_t | n, | ||
int64_t | nrhs, | ||
std::complex< double > const * | A, | ||
int64_t | lda, | ||
std::complex< double > * | AF, | ||
int64_t | ldaf, | ||
int64_t * | ipiv, | ||
std::complex< double > const * | B, | ||
int64_t | ldb, | ||
std::complex< double > * | X, | ||
int64_t | ldx, | ||
double * | rcond, | ||
double * | ferr, | ||
double * | berr | ||
) |
Uses the diagonal pivoting factorization to compute the solution to a system of linear equations \(A X = B\), where A is an n-by-n Hermitian matrix and X and B are n-by-nrhs matrices.
Error bounds on the solution and a condition estimate are also provided.
Overloaded versions are available for float
, double
, std::complex<float>
, and std::complex<double>
. For real matrices, this is an alias for lapack::sysvx
.
[in] | fact | Whether or not the factored form of A has been supplied on entry.
|
[in] | uplo |
|
[in] | n | The number of linear equations, i.e., the order of the matrix A. n >= 0. |
[in] | nrhs | The number of right hand sides, i.e., the number of columns of the matrices B and X. nrhs >= 0. |
[in] | A | The n-by-n matrix A, stored in an lda-by-n array. The Hermitian matrix A.
|
[in] | lda | The leading dimension of the array A. lda >= max(1,n). |
[in,out] | AF | The n-by-n matrix AF, stored in an ldaf-by-n array.
|
[in] | ldaf | The leading dimension of the array AF. ldaf >= max(1,n). |
[in,out] | ipiv | The vector ipiv of length n.
|
[in] | B | The n-by-nrhs matrix B, stored in an ldb-by-nrhs array. The n-by-nrhs right hand side matrix B. |
[in] | ldb | The leading dimension of the array B. ldb >= max(1,n). |
[out] | X | The n-by-nrhs matrix X, stored in an ldx-by-nrhs array. If successful or return value = n+1, the n-by-nrhs solution matrix X. |
[in] | ldx | The leading dimension of the array X. ldx >= max(1,n). |
[out] | rcond | The estimate of the reciprocal condition number of the matrix A. If rcond is less than the machine precision (in particular, if rcond = 0), the matrix is singular to working precision. This condition is indicated by a return value > 0. |
[out] | ferr | The vector ferr of length nrhs. The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X(j), ferr(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for rcond, and is almost always a slight overestimate of the true error. |
[out] | berr | The vector berr of length nrhs. The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution). |