linalg 1.6.1
A linear algebra library that provides a user-friendly interface to several BLAS and LAPACK routines.
|
Provides a C-friendly API to the LINALG library. Notice, all C-API LINALG routines begin with the prefix "la_". More...
Functions/Subroutines | |
integer(c_int) function | la_rank1_update (m, n, alpha, x, y, a, lda) |
Performs the rank-1 update to matrix A such that: A = alpha * X * Y**T + A, where A is an M-by-N matrix, alpha is a scalar, X is an M-element array, and N is an N-element array. More... | |
integer(c_int) function | la_rank1_update_cmplx (m, n, alpha, x, y, a, lda) |
Performs the rank-1 update to matrix A such that: A = alpha * X * Y**T + A, where A is an M-by-N matrix, alpha is a scalar, X is an M-element array, and N is an N-element array. More... | |
integer(c_int) function | la_trace (m, n, a, lda, rst) |
Computes the trace of a matrix (the sum of the main diagonal elements). More... | |
integer(c_int) function | la_trace_cmplx (m, n, a, lda, rst) |
Computes the trace of a matrix (the sum of the main diagonal elements). More... | |
integer(c_int) function | la_mtx_mult (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) |
Computes the matrix operation C = alpha * op(A) * op(B) + beta * C. More... | |
integer(c_int) function | la_mtx_mult_cmplx (opa, opb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) |
Computes the matrix operation C = alpha * op(A) * op(B) + beta * C. More... | |
integer(c_int) function | la_diag_mtx_mult (lside, transb, m, n, k, alpha, a, b, ldb, beta, c, ldc) |
Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C. More... | |
integer(c_int) function | la_diag_mtx_mult_mixed (lside, opb, m, n, k, alpha, a, b, ldb, beta, c, ldc) |
Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C. More... | |
integer(c_int) function | la_diag_mtx_mult_cmplx (lside, opb, m, n, k, alpha, a, b, ldb, beta, c, ldc) |
Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C. More... | |
integer(c_int) function | la_rank (m, n, a, lda, rnk) |
Computes the rank of a matrix. More... | |
integer(c_int) function | la_rank_cmplx (m, n, a, lda, rnk) |
Computes the rank of a matrix. More... | |
integer(c_int) function | la_det (n, a, lda, d) |
Computes the determinant of a square matrix. More... | |
integer(c_int) function | la_det_cmplx (n, a, lda, d) |
Computes the determinant of a square matrix. More... | |
integer(c_int) function | la_tri_mtx_mult (upper, alpha, n, a, lda, beta, b, ldb) |
Computes the triangular matrix operation: B = alpha * A**T * A + beta * B, or B = alpha * A * A**T + beta * B, where A is a triangular matrix. More... | |
integer(c_int) function | la_tri_mtx_mult_cmplx (upper, alpha, n, a, lda, beta, b, ldb) |
Computes the triangular matrix operation: B = alpha * A**T * A + beta * B, or B = alpha * A * A**T + beta * B, where A is a triangular matrix. More... | |
integer(c_int) function | la_lu_factor (m, n, a, lda, ipvt) |
Computes the LU factorization of an M-by-N matrix. More... | |
integer(c_int) function | la_lu_factor_cmplx (m, n, a, lda, ipvt) |
Computes the LU factorization of an M-by-N matrix. More... | |
integer(c_int) function | la_form_lu (n, a, lda, ipvt, u, ldu, p, ldp) |
Extracts the L, U, and P matrices from the LU factorization output from la_lu_factor. More... | |
integer(c_int) function | la_form_lu_cmplx (n, a, lda, ipvt, u, ldu, p, ldp) |
Extracts the L, U, and P matrices from the LU factorization output from la_lu_factor. More... | |
integer(c_int) function | la_qr_factor (m, n, a, lda, tau) |
Computes the QR factorization of an M-by-N matrix without pivoting. More... | |
integer(c_int) function | la_qr_factor_cmplx (m, n, a, lda, tau) |
Computes the QR factorization of an M-by-N matrix without pivoting. More... | |
integer(c_int) function | la_qr_factor_pvt (m, n, a, lda, tau, jpvt) |
Computes the QR factorization of an M-by-N matrix with column pivoting. More... | |
integer(c_int) function | la_qr_factor_cmplx_pvt (m, n, a, lda, tau, jpvt) |
Computes the QR factorization of an M-by-N matrix with column pivoting. More... | |
integer(c_int) function | la_form_qr (fullq, m, n, r, ldr, tau, q, ldq) |
Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. More... | |
integer(c_int) function | la_form_qr_cmplx (fullq, m, n, r, ldr, tau, q, ldq) |
Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. More... | |
integer(c_int) function | la_form_qr_pvt (fullq, m, n, r, ldr, tau, pvt, q, ldq, p, ldp) |
Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. This routine also inflates the pivot array into an N-by-N matrix P such that A * P = Q * R. More... | |
integer(c_int) function | la_form_qr_cmplx_pvt (fullq, m, n, r, ldr, tau, pvt, q, ldq, p, ldp) |
Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. This routine also inflates the pivot array into an N-by-N matrix P such that A * P = Q * R. More... | |
integer(c_int) function | la_mult_qr (lside, trans, m, n, k, a, lda, tau, c, ldc) |
Multiplies a general matrix by the orthogonal matrix Q from a QR factorization such that: C = op(Q) * C, or C = C * op(Q). More... | |
integer(c_int) function | la_mult_qr_cmplx (lside, trans, m, n, k, a, lda, tau, c, ldc) |
Multiplies a general matrix by the orthogonal matrix Q from a QR factorization such that: C = op(Q) * C, or C = C * op(Q). More... | |
integer(c_int) function | la_qr_rank1_update (m, n, q, ldq, r, ldr, u, v) |
Computes the rank 1 update to an M-by-N QR factored matrix A (M >= N) where A = Q * R, and A1 = A + U * V**T such that A1 = Q1 * R1. More... | |
integer(c_int) function | la_qr_rank1_update_cmplx (m, n, q, ldq, r, ldr, u, v) |
Computes the rank 1 update to an M-by-N QR factored matrix A (M >= N) where A = Q * R, and A1 = A + U * V**T such that A1 = Q1 * R1. More... | |
integer(c_int) function | la_cholesky_factor (upper, n, a, lda) |
Computes the Cholesky factorization of a symmetric, positive definite matrix. More... | |
integer(c_int) function | la_cholesky_factor_cmplx (upper, n, a, lda) |
Computes the Cholesky factorization of a symmetric, positive definite matrix. More... | |
integer(c_int) function | la_cholesky_rank1_update (n, r, ldr, u) |
Computes the rank 1 update to a Cholesky factored matrix (upper triangular). More... | |
integer(c_int) function | la_cholesky_rank1_update_cmplx (n, r, ldr, u) |
Computes the rank 1 update to a Cholesky factored matrix (upper triangular). More... | |
integer(c_int) function | la_cholesky_rank1_downdate (n, r, ldr, u) |
Computes the rank 1 downdate to a Cholesky factored matrix (upper triangular). More... | |
integer(c_int) function | la_cholesky_rank1_downdate_cmplx (n, r, ldr, u) |
Computes the rank 1 downdate to a Cholesky factored matrix (upper triangular). More... | |
integer(c_int) function | la_svd (m, n, a, lda, s, u, ldu, vt, ldv) |
Computes the singular value decomposition of a matrix A. The SVD is defined as: A = U * S * V**T, where U is an M-by-M orthogonal matrix, S is an M-by-N diagonal matrix, and V is an N-by-N orthogonal matrix. More... | |
integer(c_int) function | la_svd_cmplx (m, n, a, lda, s, u, ldu, vt, ldv) |
Computes the singular value decomposition of a matrix A. The SVD is defined as: A = U * S * V**T, where U is an M-by-M orthogonal matrix, S is an M-by-N diagonal matrix, and V is an N-by-N orthogonal matrix. More... | |
integer(c_int) function | la_solve_tri_mtx (lside, upper, trans, nounit, m, n, alpha, a, lda, b, ldb) |
Solves one of the matrix equations: op(A) * X = alpha * B, or X * op(A) = alpha * B, where A is a triangular matrix. More... | |
integer(c_int) function | la_solve_tri_mtx_cmplx (lside, upper, trans, nounit, m, n, alpha, a, lda, b, ldb) |
Solves one of the matrix equations: op(A) * X = alpha * B, or X * op(A) = alpha * B, where A is a triangular matrix. More... | |
integer(c_int) function | la_solve_lu (m, n, a, lda, ipvt, b, ldb) |
Solves a system of LU-factored equations. More... | |
integer(c_int) function | la_solve_lu_cmplx (m, n, a, lda, ipvt, b, ldb) |
Solves a system of LU-factored equations. More... | |
integer(c_int) function | la_solve_qr (m, n, k, a, lda, tau, b, ldb) |
Solves a system of M QR-factored equations of N unknowns where M >= N. More... | |
integer(c_int) function | la_solve_qr_cmplx (m, n, k, a, lda, tau, b, ldb) |
Solves a system of M QR-factored equations of N unknowns where M >= N. More... | |
integer(c_int) function | la_solve_qr_pvt (m, n, k, a, lda, tau, jpvt, b, ldb) |
Solves a system of M QR-factored equations of N unknowns. More... | |
integer(c_int) function | la_solve_qr_cmplx_pvt (m, n, k, a, lda, tau, jpvt, b, ldb) |
Solves a system of M QR-factored equations of N unknowns. More... | |
integer(c_int) function | la_solve_cholesky (upper, m, n, a, lda, b, ldb) |
Solves a system of Cholesky factored equations. More... | |
integer(c_int) function | la_solve_cholesky_cmplx (upper, m, n, a, lda, b, ldb) |
Solves a system of Cholesky factored equations. More... | |
integer(c_int) function | la_solve_least_squares (m, n, k, a, lda, b, ldb) |
Solves the overdetermined or underdetermined system (A*X = B) of M equations of N unknowns using a QR or LQ factorization of the matrix A. Notice, it is assumed that matrix A has full rank. More... | |
integer(c_int) function | la_solve_least_squares_cmplx (m, n, k, a, lda, b, ldb) |
Solves the overdetermined or underdetermined system (A*X = B) of M equations of N unknowns using a QR or LQ factorization of the matrix A. Notice, it is assumed that matrix A has full rank. More... | |
integer(c_int) function | la_inverse (n, a, lda) |
Computes the inverse of a square matrix. More... | |
integer(c_int) function | la_inverse_cmplx (n, a, lda) |
Computes the inverse of a square matrix. More... | |
integer(c_int) function | la_pinverse (m, n, a, lda, ainv, ldai) |
Computes the Moore-Penrose pseudo-inverse of an M-by-N matrix by means of singular value decomposition. More... | |
integer(c_int) function | la_pinverse_cmplx (m, n, a, lda, ainv, ldai) |
Computes the Moore-Penrose pseudo-inverse of an M-by-N matrix by means of singular value decomposition. More... | |
integer(c_int) function | la_eigen_symm (vecs, n, a, lda, vals) |
Computes the eigenvalues, and optionally the eigenvectors of a real, symmetric matrix. More... | |
integer(c_int) function | la_eigen_asymm (vecs, n, a, lda, vals, v, ldv) |
Computes the eigenvalues, and optionally the right eigenvectors of a square matrix. More... | |
integer(c_int) function | la_eigen_gen (vecs, n, a, lda, b, ldb, alpha, beta, v, ldv) |
Computes the eigenvalues, and optionally the right eigenvectors of a square matrix assuming the structure of the eigenvalue problem is A*X = lambda*B*X. More... | |
integer(c_int) function | la_eigen_cmplx (vecs, n, a, lda, vals, v, ldv) |
Computes the eigenvalues, and optionally the right eigenvectors of a square matrix. More... | |
integer(c_int) function | la_sort_eigen (ascend, n, vals, vecs, ldv) |
A sorting routine specifically tailored for sorting of eigenvalues and their associated eigenvectors using a quick-sort approach. More... | |
integer(c_int) function | la_sort_eigen_cmplx (ascend, n, vals, vecs, ldv) |
A sorting routine specifically tailored for sorting of eigenvalues and their associated eigenvectors using a quick-sort approach. More... | |
Provides a C-friendly API to the LINALG library. Notice, all C-API LINALG routines begin with the prefix "la_".
integer(c_int) function linalg_c_api::la_cholesky_factor | ( | logical(c_bool), intent(in), value | upper, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda | ||
) |
Computes the Cholesky factorization of a symmetric, positive definite matrix.
[in] | upper | Set to true to compute the upper triangular factoriztion A = U**T * U; else, set to false to compute the lower triangular factorzation A = L * L**T. |
[in] | n | The dimension of matrix A. |
[in,out] | a | On input, the N-by-N matrix to factor. On output, the factored matrix is returned in either the upper or lower triangular portion of the matrix, dependent upon the value of upper . |
[in] | lda | The leading dimension of matrix A. |
lda
is not correct.a
is not positive definite. Definition at line 1704 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_cholesky_factor_cmplx | ( | logical(c_bool), intent(in), value | upper, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda | ||
) |
Computes the Cholesky factorization of a symmetric, positive definite matrix.
[in] | upper | Set to true to compute the upper triangular factoriztion A = U**H * U; else, set to false to compute the lower triangular factorzation A = L * L**H. |
[in] | n | The dimension of matrix A. |
[in,out] | a | On input, the N-by-N matrix to factor. On output, the factored matrix is returned in either the upper or lower triangular portion of the matrix, dependent upon the value of upper . |
[in] | lda | The leading dimension of matrix A. |
lda
is not correct.a
is not positive definite. Definition at line 1748 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_cholesky_rank1_downdate | ( | integer(c_int), intent(in), value | n, |
real(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
real(c_double), dimension(*), intent(inout) | u | ||
) |
Computes the rank 1 downdate to a Cholesky factored matrix (upper triangular).
[in] | n | The dimension of the matrix. |
[in,out] | r | On input, the N-by-N upper triangular matrix R. On output, the updated matrix R1. |
[in] | ldr | The leading dimension of matrix R. |
[in,out] | u | On input, the N-element update vector U. On output, the rotation sines used to transform R to R1. |
ldr
is not correct.Definition at line 1877 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_cholesky_rank1_downdate_cmplx | ( | integer(c_int), intent(in), value | n, |
complex(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
complex(c_double), dimension(*), intent(inout) | u | ||
) |
Computes the rank 1 downdate to a Cholesky factored matrix (upper triangular).
[in] | n | The dimension of the matrix. |
[in,out] | r | On input, the N-by-N upper triangular matrix R. On output, the updated matrix R1. |
[in] | ldr | The leading dimension of matrix R. |
[in,out] | u | On input, the N-element update vector U. On output, the rotation sines used to transform R to R1. |
ldr
is not correct.Definition at line 1921 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_cholesky_rank1_update | ( | integer(c_int), intent(in), value | n, |
real(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
real(c_double), dimension(*), intent(inout) | u | ||
) |
Computes the rank 1 update to a Cholesky factored matrix (upper triangular).
[in] | n | The dimension of the matrix. |
[in,out] | r | On input, the N-by-N upper triangular matrix R. On output, the updated matrix R1. |
[in] | ldr | The leading dimension of matrix R. |
[in,out] | u | On input, the N-element update vector U. On output, the rotation sines used to transform R to R1. |
ldr
is not correct.Definition at line 1791 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_cholesky_rank1_update_cmplx | ( | integer(c_int), intent(in), value | n, |
complex(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
complex(c_double), dimension(*), intent(inout) | u | ||
) |
Computes the rank 1 update to a Cholesky factored matrix (upper triangular).
[in] | n | The dimension of the matrix. |
[in,out] | r | On input, the N-by-N upper triangular matrix R. On output, the updated matrix R1. |
[in] | ldr | The leading dimension of matrix R. |
[in,out] | u | On input, the N-element update vector U. On output, the rotation sines used to transform R to R1. |
ldr
is not correct.Definition at line 1833 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_det | ( | integer(c_int), intent(in), value | n, |
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), intent(out) | d | ||
) |
Computes the determinant of a square matrix.
n | The dimension of the matrix. | |
a | The N-by-N matrix. The matrix is overwritten on output. | |
lda | The leading dimension of the matrix. | |
[out] | d | The determinant of a . |
Definition at line 666 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_det_cmplx | ( | integer(c_int), intent(in), value | n, |
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), intent(out) | d | ||
) |
Computes the determinant of a square matrix.
n | The dimension of the matrix. | |
a | The N-by-N matrix. The matrix is overwritten on output. | |
lda | The leading dimension of the matrix. | |
[out] | d | The determinant of a . |
Definition at line 703 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_diag_mtx_mult | ( | logical(c_bool), intent(in), value | lside, |
logical(c_bool), intent(in), value | transb, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
real(c_double), intent(in), value | alpha, | ||
real(c_double), dimension(*), intent(in) | a, | ||
real(c_double), dimension(ldb,*), intent(in) | b, | ||
integer(c_int), intent(in), value | ldb, | ||
real(c_double), intent(in), value | beta, | ||
real(c_double), dimension(ldc,*), intent(inout) | c, | ||
integer(c_int), intent(in), value | ldc | ||
) |
Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C.
lside | Set to true to apply matrix A from the left; else, set to false to apply matrix A from the left. |
trans | Set to true if op(B) == B**T; else, set to false if op(B) == B. |
m | The number of rows in the matrix C. |
n | The number of columns in the matrix C. |
k | The inner dimension of the matrix product A * op(B). |
alpha | A scalar multiplier. |
a | A P-element array containing the diagonal elements of matrix A where P = MIN(m , k ) if lside is true; else, P = MIN(n , k ) if lside is false. |
b | The LDB-by-TDB matrix B where (LDB = leading dimension of B, and TDB = trailing dimension of B):
|
ldb | The leading dimension of matrix B. |
beta | A scalar multiplier. |
c | The m by n matrix C. |
ldc | The leading dimension of matrix C. |
ldb
, or ldc
are not correct.Definition at line 339 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_diag_mtx_mult_cmplx | ( | logical(c_bool), intent(in), value | lside, |
integer(c_int), intent(in), value | opb, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
complex(c_double), intent(in), value | alpha, | ||
complex(c_double), dimension(*), intent(in) | a, | ||
complex(c_double), dimension(ldb,*), intent(in) | b, | ||
integer(c_int), intent(in), value | ldb, | ||
complex(c_double), intent(in), value | beta, | ||
complex(c_double), dimension(ldc,*), intent(inout) | c, | ||
integer(c_int), intent(in), value | ldc | ||
) |
Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C.
lside | Set to true to apply matrix A from the left; else, set to false to apply matrix A from the left. |
opb | Set to LA_TRANSPOSE to compute op(B) as a direct transpose of B, set to LA_HERMITIAN_TRANSPOSE to compute op(B) as the Hermitian transpose of B, otherwise, set to NO_OPERATION to compute op(B) as B. |
m | The number of rows in the matrix C. |
n | The number of columns in the matrix C. |
k | The inner dimension of the matrix product A * op(B). |
alpha | A scalar multiplier. |
a | A P-element array containing the diagonal elements of matrix A where P = MIN(m , k ) if lside is true; else, P = MIN(n , k ) if lside is false. |
b | The LDB-by-TDB matrix B where (LDB = leading dimension of B, and TDB = trailing dimension of B):
|
ldb | The leading dimension of matrix B. |
beta | A scalar multiplier. |
c | The m by n matrix C. |
ldc | The leading dimension of matrix C. |
ldb
, or ldc
are not correct.Definition at line 516 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_diag_mtx_mult_mixed | ( | logical(c_bool), intent(in), value | lside, |
integer(c_int), intent(in), value | opb, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
complex(c_double), intent(in), value | alpha, | ||
real(c_double), dimension(*), intent(in) | a, | ||
complex(c_double), dimension(ldb,*), intent(in) | b, | ||
integer(c_int), intent(in), value | ldb, | ||
complex(c_double), intent(in), value | beta, | ||
complex(c_double), dimension(ldc,*), intent(inout) | c, | ||
integer(c_int), intent(in), value | ldc | ||
) |
Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C.
lside | Set to true to apply matrix A from the left; else, set to false to apply matrix A from the left. |
opb | Set to LA_TRANSPOSE to compute op(B) as a direct transpose of B, set to LA_HERMITIAN_TRANSPOSE to compute op(B) as the Hermitian transpose of B, otherwise, set to NO_OPERATION to compute op(B) as B. |
m | The number of rows in the matrix C. |
n | The number of columns in the matrix C. |
k | The inner dimension of the matrix product A * op(B). |
alpha | A scalar multiplier. |
a | A P-element array containing the diagonal elements of matrix A where P = MIN(m , k ) if lside is true; else, P = MIN(n , k ) if lside is false. |
b | The LDB-by-TDB matrix B where (LDB = leading dimension of B, and TDB = trailing dimension of B):
|
ldb | The leading dimension of matrix B. |
beta | A scalar multiplier. |
c | The m by n matrix C. |
ldc | The leading dimension of matrix C. |
ldb
, or ldc
are not correct.Definition at line 428 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_eigen_asymm | ( | logical(c_bool), intent(in), value | vecs, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(*), intent(out) | vals, | ||
complex(c_double), dimension(ldv,*), intent(out) | v, | ||
integer(c_int), intent(in), value | ldv | ||
) |
Computes the eigenvalues, and optionally the right eigenvectors of a square matrix.
[in] | vecs | Set to true to compute the eigenvectors as well as the eigenvalues; else, set to false to just compute the eigenvalues. |
[in] | n | The dimension of the matrix. |
[in,out] | a | On input, the N-by-N matrix on which to operate. On output, the contents of this matrix are overwritten. |
[in] | lda | The leading dimension of matrix A. |
[out] | vals | An N-element array containing the eigenvalues of the matrix. The eigenvalues are not sorted. |
[out] | v | An N-by-N matrix where the right eigenvectors will be written (one per column). |
lda
or ldv
is not correct.Definition at line 2891 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_eigen_cmplx | ( | logical(c_bool), intent(in), value | vecs, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(*), intent(out) | vals, | ||
complex(c_double), dimension(ldv,*), intent(out) | v, | ||
integer(c_int), intent(in), value | ldv | ||
) |
Computes the eigenvalues, and optionally the right eigenvectors of a square matrix.
[in] | vecs | Set to true to compute the eigenvectors as well as the eigenvalues; else, set to false to just compute the eigenvalues. |
[in] | n | The dimension of the matrix. |
[in,out] | a | On input, the N-by-N matrix on which to operate. On output, the contents of this matrix are overwritten. |
[in] | lda | The leading dimension of matrix A. |
[out] | vals | An N-element array containing the eigenvalues of the matrix. The eigenvalues are not sorted. |
[out] | v | An N-by-N matrix where the right eigenvectors will be written (one per column). |
lda
or ldv
is not correct.Definition at line 3026 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_eigen_gen | ( | logical(c_bool), intent(in), value | vecs, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb, | ||
complex(c_double), dimension(*), intent(out) | alpha, | ||
real(c_double), dimension(*), intent(out) | beta, | ||
complex(c_double), dimension(ldv,*), intent(out) | v, | ||
integer(c_int), intent(in), value | ldv | ||
) |
Computes the eigenvalues, and optionally the right eigenvectors of a square matrix assuming the structure of the eigenvalue problem is A*X = lambda*B*X.
[in] | vecs | Set to true to compute the eigenvectors as well as the eigenvalues; else, set to false to just compute the eigenvalues. |
[in] | n | The dimension of the matrix. |
[in,out] | a | On input, the N-by-N matrix A. On output, the contents of this matrix are overwritten. |
[in] | lda | The leading dimension of matrix A. |
[in,out] | b | On input, the N-by-N matrix B. On output, the contents of this matrix are overwritten. |
[in] | ldb | The leading dimension of matrix B. |
[out] | alpha | An N-element array that, if beta is not supplied, contains the eigenvalues. If beta is supplied however, the eigenvalues must be computed as ALPHA / BETA. This however, is not as trivial as it seems as it is entirely possible, and likely, that ALPHA / BETA can overflow or underflow. With that said, the values in ALPHA will always be less than and usually comparable with the NORM(A). |
[out] | beta | An optional N-element array that if provided forces alpha to return the numerator, and this array contains the denominator used to determine the eigenvalues as ALPHA / BETA. If used, the values in this array will always be less than and usually comparable with the NORM(B). |
[out] | v | An N-by-N matrix where the right eigenvectors will be written (one per column). |
lda
or ldv
is not correct.Definition at line 2964 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_eigen_symm | ( | logical(c_bool), intent(in), value | vecs, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(*), intent(out) | vals | ||
) |
Computes the eigenvalues, and optionally the eigenvectors of a real, symmetric matrix.
[in] | vecs | Set to true to compute the eigenvectors as well as the eigenvalues; else, set to false to just compute the eigenvalues. |
[in] | n | The dimension of the matrix. |
[in,out] | a | On input, the N-by-N symmetric matrix on which to operate. On output, and if vecs is set to true, the matrix will contain the eigenvectors (one per column) corresponding to each eigenvalue in vals . If vecs is set to false, the lower triangular portion of the matrix is overwritten. |
[in] | lda | The leading dimension of matrix A. |
[out] | vals | An N-element array that will contain the eigenvalues sorted into ascending order. |
lda
is not correct.Definition at line 2842 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_form_lu | ( | integer(c_int), intent(in), value | n, |
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
integer(c_int), dimension(*), intent(in) | ipvt, | ||
real(c_double), dimension(ldu,*), intent(out) | u, | ||
integer(c_int), intent(in), value | ldu, | ||
real(c_double), dimension(ldp,*), intent(out) | p, | ||
integer(c_int), intent(in), value | ldp | ||
) |
Extracts the L, U, and P matrices from the LU factorization output from la_lu_factor.
n | The dimension of the input matrix. | |
[in,out] | a | On input, the N-by-N matrix as output by la_lu_factor. On output, the N-by-N lower triangular matrix L. |
lda | The leading dimension of a . | |
ipvt | The N-element pivot array as output by la_lu_factor. | |
[out] | u | An N-by-N matrix where the U matrix will be written. |
ldu | The leading dimension of u . | |
[out] | p | An N-by-N matrix where the row permutation matrix will be written. |
ldp | The leading dimension of p . |
lda
, ldu
, or ldp
is not correct. Definition at line 930 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_form_lu_cmplx | ( | integer(c_int), intent(in), value | n, |
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
integer(c_int), dimension(*), intent(in) | ipvt, | ||
complex(c_double), dimension(ldu,*), intent(out) | u, | ||
integer(c_int), intent(in), value | ldu, | ||
real(c_double), dimension(ldp,*), intent(out) | p, | ||
integer(c_int), intent(in), value | ldp | ||
) |
Extracts the L, U, and P matrices from the LU factorization output from la_lu_factor.
n | The dimension of the input matrix. | |
[in,out] | a | On input, the N-by-N matrix as output by la_lu_factor. On output, the N-by-N lower triangular matrix L. |
lda | The leading dimension of a . | |
ipvt | The N-element pivot array as output by la_lu_factor. | |
[out] | u | An N-by-N matrix where the U matrix will be written. |
ldu | The leading dimension of u . | |
[out] | p | An N-by-N matrix where the row permutation matrix will be written. |
ldp | The leading dimension of p . |
lda
, ldu
, or ldp
is not correct. Definition at line 970 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_form_qr | ( | logical(c_bool), intent(in), value | fullq, |
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
real(c_double), dimension(*), intent(in) | tau, | ||
real(c_double), dimension(ldq,*), intent(out) | q, | ||
integer(c_int), intent(in), value | ldq | ||
) |
Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm.
[in] | fullq | Set to true to always return the full Q matrix; else, set to false, and in the event that M > N, Q may be supplied as M-by-N, and therefore only return the useful submatrix Q1 (Q = [Q1, Q2]) as the factorization can be written as Q * R = [Q1, Q2] * [R1; 0]. |
[in] | m | The number of rows in R. |
[in] | n | The number of columns in R. |
[in,out] | r | On input, the M-by-N factored matrix as returned by the QR factorization routine. On output, the upper triangular matrix R. |
[in] | ldr | The leading dimension of matrix R. |
[in] | tau | A MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in r . |
[out] | q | An M-by-M matrix where the full Q matrix will be written. In the event that fullq is set to false, and M > N, this matrix need only by M-by-N. |
[in] | ldq | The leading dimension of matrix Q. |
lda
is not correct.Definition at line 1222 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_form_qr_cmplx | ( | logical(c_bool), intent(in), value | fullq, |
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
complex(c_double), dimension(*), intent(in) | tau, | ||
complex(c_double), dimension(ldq,*), intent(out) | q, | ||
integer(c_int), intent(in), value | ldq | ||
) |
Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm.
[in] | fullq | Set to true to always return the full Q matrix; else, set to false, and in the event that M > N, Q may be supplied as M-by-N, and therefore only return the useful submatrix Q1 (Q = [Q1, Q2]) as the factorization can be written as Q * R = [Q1, Q2] * [R1; 0]. |
[in] | m | The number of rows in R. |
[in] | n | The number of columns in R. |
[in,out] | r | On input, the M-by-N factored matrix as returned by the QR factorization routine. On output, the upper triangular matrix R. |
[in] | ldr | The leading dimension of matrix R. |
[in] | tau | A MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in r . |
[out] | q | An M-by-M matrix where the full Q matrix will be written. In the event that fullq is set to false, and M > N, this matrix need only by M-by-N. |
[in] | ldq | The leading dimension of matrix Q. |
lda
is not correct.Definition at line 1280 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_form_qr_cmplx_pvt | ( | logical(c_bool), intent(in), value | fullq, |
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
complex(c_double), dimension(*), intent(in) | tau, | ||
integer(c_int), dimension(*), intent(in) | pvt, | ||
complex(c_double), dimension(ldq,*), intent(out) | q, | ||
integer(c_int), intent(in), value | ldq, | ||
complex(c_double), dimension(ldp,*), intent(out) | p, | ||
integer(c_int), intent(in), value | ldp | ||
) |
Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. This routine also inflates the pivot array into an N-by-N matrix P such that A * P = Q * R.
[in] | fullq | Set to true to always return the full Q matrix; else, set to false, and in the event that M > N, Q may be supplied as M-by-N, and therefore only return the useful submatrix Q1 (Q = [Q1, Q2]) as the factorization can be written as Q * R = [Q1, Q2] * [R1; 0]. |
[in] | m | The number of rows in R. |
[in] | n | The number of columns in R. |
[in,out] | r | On input, the M-by-N factored matrix as returned by the QR factorization routine. On output, the upper triangular matrix R. |
[in] | ldr | The leading dimension of matrix R. |
[in] | tau | A MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in r . |
[in] | pvt | An N-element array containing the pivot information from the QR factorization. |
[out] | q | An M-by-M matrix where the full Q matrix will be written. In the event that fullq is set to false, and M > N, this matrix need only by M-by-N. |
[in] | ldq | The leading dimension of matrix Q. |
[out] | p | An N-by-N matrix where the pivot matrix P will be written. |
[in] | ldp | The leading dimension of matrix P. |
lda
is not correct.Definition at line 1410 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_form_qr_pvt | ( | logical(c_bool), intent(in), value | fullq, |
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
real(c_double), dimension(*), intent(in) | tau, | ||
integer(c_int), dimension(*), intent(in) | pvt, | ||
real(c_double), dimension(ldq,*), intent(out) | q, | ||
integer(c_int), intent(in), value | ldq, | ||
real(c_double), dimension(ldp,*), intent(out) | p, | ||
integer(c_int), intent(in), value | ldp | ||
) |
Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. This routine also inflates the pivot array into an N-by-N matrix P such that A * P = Q * R.
[in] | fullq | Set to true to always return the full Q matrix; else, set to false, and in the event that M > N, Q may be supplied as M-by-N, and therefore only return the useful submatrix Q1 (Q = [Q1, Q2]) as the factorization can be written as Q * R = [Q1, Q2] * [R1; 0]. |
[in] | m | The number of rows in R. |
[in] | n | The number of columns in R. |
[in,out] | r | On input, the M-by-N factored matrix as returned by the QR factorization routine. On output, the upper triangular matrix R. |
[in] | ldr | The leading dimension of matrix R. |
[in] | tau | A MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in r . |
[in] | pvt | An N-element array containing the pivot information from the QR factorization. |
[out] | q | An M-by-M matrix where the full Q matrix will be written. In the event that fullq is set to false, and M > N, this matrix need only by M-by-N. |
[in] | ldq | The leading dimension of matrix Q. |
[out] | p | An N-by-N matrix where the pivot matrix P will be written. |
[in] | ldp | The leading dimension of matrix P. |
lda
is not correct.Definition at line 1344 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_inverse | ( | integer(c_int), intent(in), value | n, |
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda | ||
) |
Computes the inverse of a square matrix.
[in] | n | The dimension of matrix A. |
[in,out] | a | On input, the N-by-N matrix to invert. On output, the inverted matrix. |
[in] | lda | The leading dimension of matrix A. |
lda
is not correct.Definition at line 2671 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_inverse_cmplx | ( | integer(c_int), intent(in), value | n, |
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda | ||
) |
Computes the inverse of a square matrix.
[in] | n | The dimension of matrix A. |
[in,out] | a | On input, the N-by-N matrix to invert. On output, the inverted matrix. |
[in] | lda | The leading dimension of matrix A. |
lda
is not correct.Definition at line 2708 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_lu_factor | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
integer(c_int), dimension(*), intent(out) | ipvt | ||
) |
Computes the LU factorization of an M-by-N matrix.
m | The number of rows in the matrix. | |
n | The number of columns in the matrix. | |
[in,out] | a | On input, the M-by-N matrix on which to operate. On output, the LU factored matrix in the form [L\U] where the unit diagonal elements of L are not stored. |
lda | The leading dimension of matrix A. | |
[out] | ipvt | An MIN(M, N)-element array used to track row-pivot operations. The array stored pivot information such that row I is interchanged with row IPVT(I). |
lda
is not correct.a
is found to be singular. Definition at line 834 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_lu_factor_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
integer(c_int), dimension(*), intent(out) | ipvt | ||
) |
Computes the LU factorization of an M-by-N matrix.
m | The number of rows in the matrix. | |
n | The number of columns in the matrix. | |
[in,out] | a | On input, the M-by-N matrix on which to operate. On output, the LU factored matrix in the form [L\U] where the unit diagonal elements of L are not stored. |
lda | The leading dimension of matrix A. | |
[out] | ipvt | An MIN(M, N)-element array used to track row-pivot operations. The array stored pivot information such that row I is interchanged with row IPVT(I). |
lda
is not correct.a
is found to be singular. Definition at line 881 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_mtx_mult | ( | logical(c_bool), intent(in), value | transa, |
logical(c_bool), intent(in), value | transb, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
real(c_double), intent(in), value | alpha, | ||
real(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(ldb,*), intent(in) | b, | ||
integer(c_int), intent(in), value | ldb, | ||
real(c_double), intent(in), value | beta, | ||
real(c_double), dimension(ldc,*), intent(inout) | c, | ||
integer(c_int), intent(in), value | ldc | ||
) |
Computes the matrix operation C = alpha * op(A) * op(B) + beta * C.
transa | Set to true to compute op(A) as the transpose of A; else, set to false to compute op(A) as A. |
transb | Set to true to compute op(B) as the transpose of B; else, set to false to compute op(B) as B. |
m | The number of rows in c . |
n | The number of columns in c . |
k | The interior dimension of the product a and b . |
alpha | A scalar multiplier. |
a | If transa is true, this matrix must be k by m ; else, if transa is false, this matrix must be m by k . |
lda | The leading dimension of matrix a . |
b | If transb is true, this matrix must be n by k ; else, if transb is false, this matrix must be k by n . |
ldb | The leading dimension of matrix b . |
beta | A scalar multiplier. |
c | The m by n matrix C. |
ldc | The leading dimension of matrix c . |
lda
, ldb
, or ldc
are not correct. Definition at line 183 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_mtx_mult_cmplx | ( | integer(c_int), intent(in), value | opa, |
integer(c_int), intent(in), value | opb, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
complex(c_double), intent(in), value | alpha, | ||
complex(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(ldb,*), intent(in) | b, | ||
integer(c_int), intent(in), value | ldb, | ||
complex(c_double), intent(in), value | beta, | ||
complex(c_double), dimension(ldc,*), intent(inout) | c, | ||
integer(c_int), intent(in), value | ldc | ||
) |
Computes the matrix operation C = alpha * op(A) * op(B) + beta * C.
opa | Set to LA_TRANSPOSE to compute op(A) as a direct transpose of A, set to LA_HERMITIAN_TRANSPOSE to compute op(A) as the Hermitian transpose of A, otherwise, set to NO_OPERATION to compute op(A) as A. |
opb | Set to LA_TRANSPOSE to compute op(B) as a direct transpose of B, set to LA_HERMITIAN_TRANSPOSE to compute op(B) as the Hermitian transpose of B, otherwise, set to NO_OPERATION to compute op(B) as B. |
mThe | number of rows in c . |
n | The number of columns in c . |
k | The interior dimension of the product a and b . |
alpha | A scalar multiplier. |
a | If opa is LA_TRANSPOSE or LA_HERMITIAN_TRANSPOSE, this matrix must be k by m ; else, this matrix must be m by k . |
lda | The leading dimension of matrix a . |
b | If opb is LA_TRANSPOSE or LA_HERMITIAN_TRANSPOSE, this matrix must be n by k ; else, this matrix must be k by n . |
ldb | The leading dimension of matrix b . |
beta | A scalar multiplier. |
c | The m by n matrix C. |
ldc | The leading dimension of matrix c . |
lda
, ldb
, or ldc
are not correct. Definition at line 254 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_mult_qr | ( | logical(c_bool), intent(in), value | lside, |
logical(c_bool), intent(in), value | trans, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(*), intent(in) | tau, | ||
real(c_double), dimension(ldc,*), intent(inout) | c, | ||
integer(c_int), intent(in), value | ldc | ||
) |
Multiplies a general matrix by the orthogonal matrix Q from a QR factorization such that: C = op(Q) * C, or C = C * op(Q).
[in] | lside | Set to true to apply Q or Q**T from the left; else, set to false to apply Q or Q**T from the right. |
[in] | trans | Set to true to apply Q**T; else, set to false. |
[in] | m | The number of rows in matrix C. |
[in] | n | The number of columns in matrix C. |
[in] | k | The number of elementary reflectors whose product defines the matrix Q. |
[in] | a | On input, an LDA-by-K matrix containing the elementary reflectors output from the QR factorization. If lside is set to true, LDA = M, and M >= K >= 0; else, if lside is set to false, LDA = N, and N >= K >= 0. Notice, the contents of this matrix are restored on exit. |
[in] | lda | The leading dimension of matrix A. |
[in] | tau | A K-element array containing the scalar factors of each elementary reflector defined in a . |
[in,out] | c | On input, the M-by-N matrix C. On output, the product of the orthogonal matrix Q and the original matrix C. |
[in] | ldc | THe leading dimension of matrix C. |
lda
is not correct.Definition at line 1473 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_mult_qr_cmplx | ( | logical(c_bool), intent(in), value | lside, |
logical(c_bool), intent(in), value | trans, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(*), intent(in) | tau, | ||
complex(c_double), dimension(ldc,*), intent(inout) | c, | ||
integer(c_int), intent(in), value | ldc | ||
) |
Multiplies a general matrix by the orthogonal matrix Q from a QR factorization such that: C = op(Q) * C, or C = C * op(Q).
[in] | lside | Set to true to apply Q or Q**H from the left; else, set to false to apply Q or Q**H from the right. |
[in] | trans | Set to true to apply Q**H; else, set to false. |
[in] | m | The number of rows in matrix C. |
[in] | n | The number of columns in matrix C. |
[in] | k | The number of elementary reflectors whose product defines the matrix Q. |
[in] | a | On input, an LDA-by-K matrix containing the elementary reflectors output from the QR factorization. If lside is set to true, LDA = M, and M >= K >= 0; else, if lside is set to false, LDA = N, and N >= K >= 0. Notice, the contents of this matrix are restored on exit. |
[in] | lda | The leading dimension of matrix A. |
[in] | tau | A K-element array containing the scalar factors of each elementary reflector defined in a . |
[in,out] | c | On input, the M-by-N matrix C. On output, the product of the orthogonal matrix Q and the original matrix C. |
[in] | ldc | THe leading dimension of matrix C. |
lda
is not correct.Definition at line 1544 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_pinverse | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(ldai,*), intent(out) | ainv, | ||
integer(c_int), intent(in), value | ldai | ||
) |
Computes the Moore-Penrose pseudo-inverse of an M-by-N matrix by means of singular value decomposition.
[in] | m | The number of rows in the matrix. @parma[in] n The number of columns in the matrix. |
[in,out] | a | On input, the M-by-N matrix to invert. The matrix is overwritten on output. |
[in] | lda | The leading dimension of matrix A. |
[out] | ainv | The N-by-M matrix where the pseudo-inverse of a will be written. |
[in] | ldai | The leading dimension of matrix AINV. |
lda
, or ldai
is not correct. Definition at line 2750 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_pinverse_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(ldai,*), intent(out) | ainv, | ||
integer(c_int), intent(in), value | ldai | ||
) |
Computes the Moore-Penrose pseudo-inverse of an M-by-N matrix by means of singular value decomposition.
[in] | m | The number of rows in the matrix. @parma[in] n The number of columns in the matrix. |
[in,out] | a | On input, the M-by-N matrix to invert. The matrix is overwritten on output. |
[in] | lda | The leading dimension of matrix A. |
[out] | ainv | The N-by-M matrix where the pseudo-inverse of a will be written. |
[in] | ldai | The leading dimension of matrix AINV. |
lda
, or ldai
is not correct. Definition at line 2793 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_qr_factor | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(*), intent(out) | tau | ||
) |
Computes the QR factorization of an M-by-N matrix without pivoting.
m | The number of rows in the matrix. | |
n | The number of columns in the matrix. | |
[in,out] | a | On input, the M-by-N matrix to factor. On output, the elements on and above the diagonal contain the MIN(M, N)-by-N upper trapezoidal matrix R (R is upper triangular if M >= N). The elements below the diagonal, along with the array tau , represent the orthogonal matrix Q as a product of elementary reflectors. |
lda | The leading dimension of matrix A. | |
[out] | tau | A MIN(M, N)-element array used to store the scalar factors of the elementary reflectors. |
lda
is not correct.Definition at line 1011 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_qr_factor_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(*), intent(out) | tau | ||
) |
Computes the QR factorization of an M-by-N matrix without pivoting.
m | The number of rows in the matrix. | |
n | The number of columns in the matrix. | |
[in,out] | a | On input, the M-by-N matrix to factor. On output, the elements on and above the diagonal contain the MIN(M, N)-by-N upper trapezoidal matrix R (R is upper triangular if M >= N). The elements below the diagonal, along with the array tau , represent the orthogonal matrix Q as a product of elementary reflectors. |
lda | The leading dimension of matrix A. | |
[out] | tau | A MIN(M, N)-element array used to store the scalar factors of the elementary reflectors. |
lda
is not correct.Definition at line 1060 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_qr_factor_cmplx_pvt | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(*), intent(out) | tau, | ||
integer(c_int), dimension(*), intent(inout) | jpvt | ||
) |
Computes the QR factorization of an M-by-N matrix with column pivoting.
m | The number of rows in the matrix. | |
n | The number of columns in the matrix. | |
[in,out] | a | On input, the M-by-N matrix to factor. On output, the elements on and above the diagonal contain the MIN(M, N)-by-N upper trapezoidal matrix R (R is upper triangular if M >= N). The elements below the diagonal, along with the array tau , represent the orthogonal matrix Q as a product of elementary reflectors. |
lda | The leading dimension of matrix A. | |
[out] | tau | A MIN(M, N)-element array used to store the scalar factors of the elementary reflectors. |
[in,out] | jpvt | On input, an N-element array that if JPVT(I) .ne. 0, the I-th column of A is permuted to the front of A * P; if JPVT(I) = 0, the I-th column of A is a free column. On output, if JPVT(I) = K, then the I-th column of A * P was the K-th column of A. |
lda
is not correct.Definition at line 1167 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_qr_factor_pvt | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(*), intent(out) | tau, | ||
integer(c_int), dimension(*), intent(inout) | jpvt | ||
) |
Computes the QR factorization of an M-by-N matrix with column pivoting.
m | The number of rows in the matrix. | |
n | The number of columns in the matrix. | |
[in,out] | a | On input, the M-by-N matrix to factor. On output, the elements on and above the diagonal contain the MIN(M, N)-by-N upper trapezoidal matrix R (R is upper triangular if M >= N). The elements below the diagonal, along with the array tau , represent the orthogonal matrix Q as a product of elementary reflectors. |
lda | The leading dimension of matrix A. | |
[out] | tau | A MIN(M, N)-element array used to store the scalar factors of the elementary reflectors. |
[in,out] | jpvt | On input, an N-element array that if JPVT(I) .ne. 0, the I-th column of A is permuted to the front of A * P; if JPVT(I) = 0, the I-th column of A is a free column. On output, if JPVT(I) = K, then the I-th column of A * P was the K-th column of A. |
lda
is not correct.Definition at line 1113 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_qr_rank1_update | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(ldq,*), intent(inout) | q, | ||
integer(c_int), intent(in), value | ldq, | ||
real(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
real(c_double), dimension(*), intent(inout) | u, | ||
real(c_double), dimension(*), intent(inout) | v | ||
) |
Computes the rank 1 update to an M-by-N QR factored matrix A (M >= N) where A = Q * R, and A1 = A + U * V**T such that A1 = Q1 * R1.
[in] | m | The number of rows in R. |
[in] | n | The number of columns in R. |
[in,out] | q | On input, the original M-by-K orthogonal matrix Q. On output, the updated matrix Q1. |
[in] | ldq | The leading dimension of matrix Q. |
[in,out] | r | On input, the M-by-N matrix R. On output, the updated matrix R1. |
[in] | ldr | The leading dimension of matrix R. |
[in,out] | u | On input, the M-element U update vector. On output, the original content of the array is overwritten. |
[in,out] | v | On input, the N-element V update vector. On output, the original content of the array is overwritten. |
ldq
or ldr
is not correct.Definition at line 1609 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_qr_rank1_update_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(ldq,*), intent(inout) | q, | ||
integer(c_int), intent(in), value | ldq, | ||
complex(c_double), dimension(ldr,*), intent(inout) | r, | ||
integer(c_int), intent(in), value | ldr, | ||
complex(c_double), dimension(*), intent(inout) | u, | ||
complex(c_double), dimension(*), intent(inout) | v | ||
) |
Computes the rank 1 update to an M-by-N QR factored matrix A (M >= N) where A = Q * R, and A1 = A + U * V**T such that A1 = Q1 * R1.
[in] | m | The number of rows in R. |
[in] | n | The number of columns in R. |
[in,out] | q | On input, the original M-by-K orthogonal matrix Q. On output, the updated matrix Q1. |
[in] | ldq | The leading dimension of matrix Q. |
[in,out] | r | On input, the M-by-N matrix R. On output, the updated matrix R1. |
[in] | ldr | The leading dimension of matrix R. |
[in,out] | u | On input, the M-element U update vector. On output, the original content of the array is overwritten. |
[in,out] | v | On input, the N-element V update vector. On output, the original content of the array is overwritten. |
ldq
or ldr
is not correct.Definition at line 1659 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_rank | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
integer(c_int), intent(out) | rnk | ||
) |
Computes the rank of a matrix.
m | The number of rows in the matrix. | |
n | The number of columns in the matrix. | |
a | The M-by-N matrix. The matrix is overwritten as part of this operation. | |
lda | The leading dimension of matrix A. | |
[out] | rnk | The rank of a . |
lda
is not correct.Definition at line 588 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_rank1_update | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), intent(in), value | alpha, | ||
real(c_double), dimension(*), intent(in) | x, | ||
real(c_double), dimension(*), intent(in) | y, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda | ||
) |
Performs the rank-1 update to matrix A such that: A = alpha * X * Y**T + A, where A is an M-by-N matrix, alpha is a scalar, X is an M-element array, and N is an N-element array.
[in] | m | The number of rows in the matrix. |
[in] | n | The number of columns in the matrix. |
[in] | alpha | The scalar multiplier. |
[in] | x | An M-element array. |
[in] | y | An N-element array. |
[in,out] | a | On input, the M-by-N matrix to update. On output, the updated M-by-N matrix. |
[in] | lda | The leading dimension of matrix A. |
lda
is not correct. Definition at line 29 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_rank1_update_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), intent(in), value | alpha, | ||
complex(c_double), dimension(*), intent(in) | x, | ||
complex(c_double), dimension(*), intent(in) | y, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda | ||
) |
Performs the rank-1 update to matrix A such that: A = alpha * X * Y**T + A, where A is an M-by-N matrix, alpha is a scalar, X is an M-element array, and N is an N-element array.
[in] | m | The number of rows in the matrix. |
[in] | n | The number of columns in the matrix. |
[in] | alpha | The scalar multiplier. |
[in] | x | An M-element array. |
[in] | y | An N-element array. |
[in,out] | a | On input, the M-by-N matrix to update. On output, the updated M-by-N matrix. |
[in] | lda | The leading dimension of matrix A. |
lda
is not correct. Definition at line 68 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_rank_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
integer(c_int), intent(out) | rnk | ||
) |
Computes the rank of a matrix.
m | The number of rows in the matrix. | |
n | The number of columns in the matrix. | |
a | The M-by-N matrix. The matrix is overwritten as part of this operation. | |
lda | The leading dimension of matrix A. | |
[out] | rnk | The rank of a . |
lda
is not correct.Definition at line 628 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_cholesky | ( | logical(c_bool), intent(in), value | upper, |
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves a system of Cholesky factored equations.
[in] | upper | Set to true if the original matrix A was factored such that A = U**T * U; else, set to false if the factorization of A was A = L**T * L. |
[in] | m | The number of rows in matrix B. |
[in] | n | The number of columns in matrix B. |
[in] | a | The M-by-M Cholesky factored matrix. |
[in] | lda | The leading dimension of matrix A. |
[in,out] | b | On input, the M-by-N right-hand-side matrix B. On output, the M-by-N solution matrix X. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct. Definition at line 2490 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_cholesky_cmplx | ( | logical(c_bool), intent(in), value | upper, |
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves a system of Cholesky factored equations.
[in] | upper | Set to true if the original matrix A was factored such that A = U**T * U; else, set to false if the factorization of A was A = L**T * L. |
[in] | m | The number of rows in matrix B. |
[in] | n | The number of columns in matrix B. |
[in] | a | The M-by-M Cholesky factored matrix. |
[in] | lda | The leading dimension of matrix A. |
[in,out] | b | On input, the M-by-N right-hand-side matrix B. On output, the M-by-N solution matrix X. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct. Definition at line 2531 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_least_squares | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves the overdetermined or underdetermined system (A*X = B) of M equations of N unknowns using a QR or LQ factorization of the matrix A. Notice, it is assumed that matrix A has full rank.
[in] | m | The number of equations (rows in matrix A). |
[in] | n | The number of unknowns (columns in matrix A). |
[in] | k | The number of columns in the right-hand-side matrix. |
[in,out] | a | On input, the M-by-N matrix A. On output, if M >= N, the QR factorization of A in the form as output by qr_factor; else, if M < N, the LQ factorization of A. |
[in] | lda | The leading dimension of matrix A. |
[in,out] | b | If M >= N, the M-by-NRHS matrix B. On output, the first N rows contain the N-by-NRHS solution matrix X. If M < N, an N-by-NRHS matrix with the first M rows containing the matrix B. On output, the N-by-NRHS solution matrix X. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct.a
is not of full rank. Definition at line 2579 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_least_squares_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves the overdetermined or underdetermined system (A*X = B) of M equations of N unknowns using a QR or LQ factorization of the matrix A. Notice, it is assumed that matrix A has full rank.
[in] | m | The number of equations (rows in matrix A). |
[in] | n | The number of unknowns (columns in matrix A). |
[in] | k | The number of columns in the right-hand-side matrix. |
[in,out] | a | On input, the M-by-N matrix A. On output, if M >= N, the QR factorization of A in the form as output by qr_factor; else, if M < N, the LQ factorization of A. |
[in] | lda | The leading dimension of matrix A. |
[in,out] | b | If M >= N, the M-by-NRHS matrix B. On output, the first N rows contain the N-by-NRHS solution matrix X. If M < N, an N-by-NRHS matrix with the first M rows containing the matrix B. On output, the N-by-NRHS solution matrix X. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct.a
is not of full rank. Definition at line 2631 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_lu | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
integer(c_int), dimension(*), intent(in) | ipvt, | ||
real(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves a system of LU-factored equations.
[in] | m | The number of rows in matrix B. |
[in] | n | The number of columns in matrix B. |
[in] | a | The M-by-M LU factored matrix. |
[in] | lda | The leading dimension of matrix A. |
[in] | ipvt | The M-element pivot array from the LU factorization. |
[in,out] | b | On input, the M-by-N right-hand-side. On output, the M-by-N solution. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct. Definition at line 2200 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_lu_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
integer(c_int), dimension(*), intent(in) | ipvt, | ||
complex(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves a system of LU-factored equations.
[in] | m | The number of rows in matrix B. |
[in] | n | The number of columns in matrix B. |
[in] | a | The M-by-M LU factored matrix. |
[in] | lda | The leading dimension of matrix A. |
[in] | ipvt | The M-element pivot array from the LU factorization. |
[in,out] | b | On input, the M-by-N right-hand-side. On output, the M-by-N solution. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct. Definition at line 2239 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_qr | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(*), intent(in) | tau, | ||
real(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves a system of M QR-factored equations of N unknowns where M >= N.
[in] | m | The number of equations (rows in matrix A). |
[in] | n | The number of unknowns (columns in matrix A). |
[in] | k | The number of columns in the right-hand-side matrix. |
[in,out] | a | On input, the M-by-N QR factored matrix as returned by qr_factor. On output, the contents of this matrix are restored. |
[in] | lda | The leading dimension of matrix A. |
[in] | tau | A MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by qr_factor. |
[in,out] | b | On input, the M-by-K right-hand-side matrix. On output, the first N rows are overwritten by the solution matrix X. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct, or if m
is less than n
.Definition at line 2285 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_qr_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(*), intent(in) | tau, | ||
complex(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves a system of M QR-factored equations of N unknowns where M >= N.
[in] | m | The number of equations (rows in matrix A). |
[in] | n | The number of unknowns (columns in matrix A). |
[in] | k | The number of columns in the right-hand-side matrix. |
[in,out] | a | On input, the M-by-N QR factored matrix as returned by qr_factor. On output, the contents of this matrix are restored. |
[in] | lda | The leading dimension of matrix A. |
[in] | tau | A MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by qr_factor. |
[in,out] | b | On input, the M-by-K right-hand-side matrix. On output, the first N rows are overwritten by the solution matrix X. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct, or if m
is less than n
.Definition at line 2336 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_qr_cmplx_pvt | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(*), intent(in) | tau, | ||
integer(c_int), dimension(*), intent(in) | jpvt, | ||
complex(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves a system of M QR-factored equations of N unknowns.
[in] | m | The number of equations (rows in matrix A). |
[in] | n | The number of unknowns (columns in matrix A). |
[in] | k | The number of columns in the right-hand-side matrix. |
[in,out] | a | On input, the M-by-N QR factored matrix as returned by qr_factor. On output, the contents of this matrix are restored. |
[in] | lda | The leading dimension of matrix A. |
[in] | tau | A MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by qr_factor. |
[in] | jpvt | The N-element array that was used to track the column pivoting operations in the QR factorization. |
[in,out] | b | On input, the M-by-K right-hand-side matrix. On output, the first N rows are overwritten by the solution matrix X. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct.Definition at line 2441 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_qr_pvt | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
integer(c_int), intent(in), value | k, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(*), intent(in) | tau, | ||
integer(c_int), dimension(*), intent(in) | jpvt, | ||
real(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves a system of M QR-factored equations of N unknowns.
[in] | m | The number of equations (rows in matrix A). |
[in] | n | The number of unknowns (columns in matrix A). |
[in] | k | The number of columns in the right-hand-side matrix. |
[in,out] | a | On input, the M-by-N QR factored matrix as returned by qr_factor. On output, the contents of this matrix are restored. |
[in] | lda | The leading dimension of matrix A. |
[in] | tau | A MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by qr_factor. |
[in] | jpvt | The N-element array that was used to track the column pivoting operations in the QR factorization. |
[in,out] | b | On input, the M-by-K right-hand-side matrix. On output, the first N rows are overwritten by the solution matrix X. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct.Definition at line 2387 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_tri_mtx | ( | logical(c_bool), intent(in), value | lside, |
logical(c_bool), intent(in), value | upper, | ||
logical(c_bool), intent(in), value | trans, | ||
logical(c_bool), intent(in), value | nounit, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
real(c_double), intent(in), value | alpha, | ||
real(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves one of the matrix equations: op(A) * X = alpha * B, or X * op(A) = alpha * B, where A is a triangular matrix.
[in] | lside | Set to true to solve op(A) * X = alpha * B; else, set to false to solve X * op(A) = alpha * B. |
[in] | upper | Set to true if A is an upper triangular matrix; else, set to false if A is a lower triangular matrix. |
[in] | trans | Set to true if op(A) = A**T; else, set to false if op(A) = A. |
[in] | nounit | Set to true if A is not a unit-diagonal matrix (ones on every diagonal element); else, set to false if A is a unit-diagonal matrix. |
[in] | m | The number of rows in matrix B. |
[in] | n | The number of columns in matrix B. |
[in] | alpha | The scalar multiplier to B. |
[in] | a | If lside is true, the M-by-M triangular matrix on which to operate; else, if lside is false, the N-by-N triangular matrix on which to operate. |
[in] | lda | The leading dimension of matrix A. |
[in,out] | b | On input, the M-by-N right-hand-side. On output, the M-by-N solution. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct. Definition at line 2089 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_solve_tri_mtx_cmplx | ( | logical(c_bool), intent(in), value | lside, |
logical(c_bool), intent(in), value | upper, | ||
logical(c_bool), intent(in), value | trans, | ||
logical(c_bool), intent(in), value | nounit, | ||
integer(c_int), intent(in), value | m, | ||
integer(c_int), intent(in), value | n, | ||
complex(c_double), intent(in), value | alpha, | ||
complex(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Solves one of the matrix equations: op(A) * X = alpha * B, or X * op(A) = alpha * B, where A is a triangular matrix.
[in] | lside | Set to true to solve op(A) * X = alpha * B; else, set to false to solve X * op(A) = alpha * B. |
[in] | upper | Set to true if A is an upper triangular matrix; else, set to false if A is a lower triangular matrix. |
[in] | trans | Set to true if op(A) = A**H; else, set to false if op(A) = A. |
[in] | nounit | Set to true if A is not a unit-diagonal matrix (ones on every diagonal element); else, set to false if A is a unit-diagonal matrix. |
[in] | m | The number of rows in matrix B. |
[in] | n | The number of columns in matrix B. |
[in] | alpha | The scalar multiplier to B. |
[in] | a | If lside is true, the M-by-M triangular matrix on which to operate; else, if lside is false, the N-by-N triangular matrix on which to operate. |
[in] | lda | The leading dimension of matrix A. |
[in,out] | b | On input, the M-by-N right-hand-side. On output, the M-by-N solution. |
[in] | ldb | The leading dimension of matrix B. |
lda
, or ldb
is not correct. Definition at line 2150 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_sort_eigen | ( | logical(c_bool), intent(in), value | ascend, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(*), intent(inout) | vals, | ||
real(c_double), dimension(ldv,*), intent(inout) | vecs, | ||
integer(c_int), intent(in), value | ldv | ||
) |
A sorting routine specifically tailored for sorting of eigenvalues and their associated eigenvectors using a quick-sort approach.
[in] | ascend | |
[in] | n | The number of eigenvalues. |
[in,out] | vals | On input, an N-element array containing the eigenvalues. On output, the sorted eigenvalues. |
[in,out] | vecs | On input, an N-by-N matrix containing the eigenvectors associated with vals (one vector per column). On output, the sorted eigenvector matrix. |
[in] | ldv | The leading dimension of vecs . |
ldv
is not correct.Definition at line 3083 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_sort_eigen_cmplx | ( | logical(c_bool), intent(in), value | ascend, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(*), intent(inout) | vals, | ||
complex(c_double), dimension(ldv,*), intent(inout) | vecs, | ||
integer(c_int), intent(in), value | ldv | ||
) |
A sorting routine specifically tailored for sorting of eigenvalues and their associated eigenvectors using a quick-sort approach.
[in] | ascend | |
[in] | n | The number of eigenvalues. |
[in,out] | vals | On input, an N-element array containing the eigenvalues. On output, the sorted eigenvalues. |
[in,out] | vecs | On input, an N-by-N matrix containing the eigenvectors associated with vals (one vector per column). On output, the sorted eigenvector matrix. |
[in] | ldv | The leading dimension of vecs . |
ldv
is not correct.Definition at line 3128 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_svd | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(*), intent(out) | s, | ||
real(c_double), dimension(ldu,*), intent(out) | u, | ||
integer(c_int), intent(in), value | ldu, | ||
real(c_double), dimension(ldv,*), intent(out) | vt, | ||
integer(c_int), intent(in), value | ldv | ||
) |
Computes the singular value decomposition of a matrix A. The SVD is defined as: A = U * S * V**T, where U is an M-by-M orthogonal matrix, S is an M-by-N diagonal matrix, and V is an N-by-N orthogonal matrix.
[in] | m | The number of rows in the matrix. |
[in] | n | The number of columns in the matrix. |
[in,out] | a | On input, the M-by-N matrix to factor. The matrix is overwritten on output. |
[in] | lda | The leading dimension of matrix A. |
[out] | s | A MIN(M, N)-element array containing the singular values of a sorted in descending order. |
[out] | u | An M-by-M matrix where the orthogonal U matrix will be written. |
[in] | ldu | The leading dimension of matrix U. |
[out] | vt | An N-by-N matrix where the transpose of the right singular vector matrix V. |
[in] | ldv | The leading dimension of matrix V. |
lda
, ldu
, or ldv
is not correct.Definition at line 1975 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_svd_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(inout) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), dimension(*), intent(out) | s, | ||
complex(c_double), dimension(ldu,*), intent(out) | u, | ||
integer(c_int), intent(in), value | ldu, | ||
complex(c_double), dimension(ldv,*), intent(out) | vt, | ||
integer(c_int), intent(in), value | ldv | ||
) |
Computes the singular value decomposition of a matrix A. The SVD is defined as: A = U * S * V**T, where U is an M-by-M orthogonal matrix, S is an M-by-N diagonal matrix, and V is an N-by-N orthogonal matrix.
[in] | m | The number of rows in the matrix. |
[in] | n | The number of columns in the matrix. |
[in,out] | a | On input, the M-by-N matrix to factor. The matrix is overwritten on output. |
[in] | lda | The leading dimension of matrix A. |
[out] | s | A MIN(M, N)-element array containing the singular values of a sorted in descending order. |
[out] | u | An M-by-M matrix where the orthogonal U matrix will be written. |
[in] | ldu | The leading dimension of matrix U. |
[out] | vt | An N-by-N matrix where the transpose of the right singular vector matrix V. |
[in] | ldv | The leading dimension of matrix V. |
lda
, ldu
, or ldv
is not correct.Definition at line 2032 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_trace | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), intent(out) | rst | ||
) |
Computes the trace of a matrix (the sum of the main diagonal elements).
[in] | m | The number of rows in the matrix. |
[in] | n | The number of columns in the matrix. |
[in] | a | The M-by-N matrix on which to operate. |
[in] | lda | The leading dimension of the matrix. |
[out] | rst | The results of the operation. |
lda
is not correct. Definition at line 103 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_trace_cmplx | ( | integer(c_int), intent(in), value | m, |
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), intent(out) | rst | ||
) |
Computes the trace of a matrix (the sum of the main diagonal elements).
[in] | m | The number of rows in the matrix. |
[in] | n | The number of columns in the matrix. |
[in] | a | The M-by-N matrix on which to operate. |
[in] | lda | The leading dimension of the matrix. |
[out] | rst | The results of the operation. |
lda
is not correct. Definition at line 137 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_tri_mtx_mult | ( | logical(c_bool), intent(in), value | upper, |
real(c_double), intent(in), value | alpha, | ||
integer(c_int), intent(in), value | n, | ||
real(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
real(c_double), intent(in), value | beta, | ||
real(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Computes the triangular matrix operation: B = alpha * A**T * A + beta * B, or B = alpha * A * A**T + beta * B, where A is a triangular matrix.
upper | Set to true if matrix A is upper triangular, and B = alpha * A**T * A + beta * B is to be calculated; else, set to false if A is lower triangular, and B = alpha * A * A**T + beta * B is to be computed. |
alpha | A scalar multiplier. |
n | The dimension of the matrix. |
a | The n by n triangular matrix A. Notice, if upper is true, only the upper triangular portion of this matrix is referenced; else, if upper is false, only the lower triangular portion of this matrix is referenced. |
lda | The leading dimension of matrix A. |
beta | A scalar multiplier. |
b | On input, the n by n matrix B. On output, the n by n resulting matrix. |
ldb | The leading dimension of matrix B. |
lda
or ldb
are not correct. Definition at line 750 of file linalg_c_api.f90.
integer(c_int) function linalg_c_api::la_tri_mtx_mult_cmplx | ( | logical(c_bool), intent(in), value | upper, |
complex(c_double), intent(in), value | alpha, | ||
integer(c_int), intent(in), value | n, | ||
complex(c_double), dimension(lda,*), intent(in) | a, | ||
integer(c_int), intent(in), value | lda, | ||
complex(c_double), intent(in), value | beta, | ||
complex(c_double), dimension(ldb,*), intent(inout) | b, | ||
integer(c_int), intent(in), value | ldb | ||
) |
Computes the triangular matrix operation: B = alpha * A**T * A + beta * B, or B = alpha * A * A**T + beta * B, where A is a triangular matrix.
upper | Set to true if matrix A is upper triangular, and B = alpha * A**T * A + beta * B is to be calculated; else, set to false if A is lower triangular, and B = alpha * A * A**T + beta * B is to be computed. |
alpha | A scalar multiplier. |
n | The dimension of the matrix. |
a | The n by n triangular matrix A. Notice, if upper is true, only the upper triangular portion of this matrix is referenced; else, if upper is false, only the lower triangular portion of this matrix is referenced. |
lda | The leading dimension of matrix A. |
beta | A scalar multiplier. |
b | On input, the n by n matrix B. On output, the n by n resulting matrix. |
ldb | The leading dimension of matrix B. |
lda
or ldb
are not correct. Definition at line 795 of file linalg_c_api.f90.