linear algebra functions More...
#include "a.h"
Go to the source code of this file.
Functions | |
void | a_real_T1 (a_uint n, a_real *A) |
transpose an n x n square matrix in-place. | |
void | a_real_T2 (a_uint m, a_uint n, a_real const *__restrict A, a_real *__restrict T) |
transpose a given m x n matrix A into an n x m matrix T. | |
void | a_real_eye1 (a_uint n, a_real *E) |
generate an m x n matrix with ones on the diagonal and zeros elsewhere. | |
void | a_real_eye2 (a_uint m, a_uint n, a_real *E) |
generate an m x n matrix with ones on the diagonal and zeros elsewhere. | |
void | a_real_tri1 (a_uint n, a_real *L) |
generate an m x n matrix with ones in the lower triangular part and zeros elsewhere. | |
void | a_real_tri2 (a_uint m, a_uint n, a_real *L) |
generate an m x n matrix with ones in the lower triangular part and zeros elsewhere. | |
void | a_real_diag (a_uint n, a_real const *__restrict a, a_real *__restrict A) |
compute a diagonal matrix from a given diagonal vector. | |
void | a_real_diag1 (a_uint n, a_real const *__restrict A, a_real *__restrict a) |
extract a diagonal vector from a given diagonal matrix. | |
void | a_real_diag2 (a_uint m, a_uint n, a_real const *__restrict A, a_real *__restrict a) |
extract a diagonal vector from a given diagonal matrix. | |
void | a_real_triL (a_uint n, a_real const *__restrict A, a_real *__restrict L) |
extract the lower triangular part of a square matrix, including the diagonal. | |
void | a_real_triL1 (a_uint n, a_real const *__restrict A, a_real *__restrict L) |
extract the lower triangular part of a square matrix, set the diagonal to 1. | |
void | a_real_triL2 (a_uint m, a_uint n, a_real const *__restrict A, a_real *__restrict L) |
extract the lower triangular part of a square matrix, including the diagonal. | |
void | a_real_triU (a_uint n, a_real const *__restrict A, a_real *__restrict U) |
extract the upper triangular part of a square matrix, including the diagonal. | |
void | a_real_triU1 (a_uint n, a_real const *__restrict A, a_real *__restrict U) |
extract the upper triangular part of a square matrix, set the diagonal to 1. | |
void | a_real_triU2 (a_uint m, a_uint n, a_real const *__restrict A, a_real *__restrict U) |
extract the upper triangular part of a square matrix, including the diagonal. | |
void | a_real_mulmm (a_uint row, a_uint c_r, a_uint col, a_real const *__restrict X, a_real const *__restrict Y, a_real *__restrict Z) |
multiply two matrices X and Y, storing the result in Z. | |
void | a_real_mulTm (a_uint c_r, a_uint row, a_uint col, a_real const *__restrict X, a_real const *__restrict Y, a_real *__restrict Z) |
multiply the transpose of matrix X with matrix Y, storing the result in Z. | |
void | a_real_mulmT (a_uint row, a_uint col, a_uint c_r, a_real const *__restrict X, a_real const *__restrict Y, a_real *__restrict Z) |
multiply matrix X with the transpose of matrix Y, storing the result in Z. | |
void | a_real_mulTT (a_uint row, a_uint c_r, a_uint col, a_real const *__restrict X, a_real const *__restrict Y, a_real *__restrict Z) |
multiply the transpose of matrix X with the transpose of matrix Y, storing the result in Z. | |
int | a_real_plu (a_uint n, a_real *A, a_uint *p, int *sign) |
compute LU decomposition of a square matrix with partial pivoting. | |
void | a_real_plu_P (a_uint n, a_uint const *__restrict p, a_real *__restrict P) |
construct the permutation matrix P from a permutation vector p. | |
void | a_real_plu_P_ (a_uint n, a_uint const *__restrict p, a_real *__restrict P) |
void | a_real_plu_L (a_uint n, a_real const *__restrict A, a_real *__restrict L) |
extract the lower triangular matrix L from matrix A. | |
void | a_real_plu_U (a_uint n, a_real const *__restrict A, a_real *__restrict U) |
extract the upper triangular matrix U from matrix A. | |
void | a_real_plu_apply (a_uint n, a_uint const *__restrict p, a_real const *__restrict b, a_real *__restrict Pb) |
apply the permutation P to the vector b, producing Pb. | |
void | a_real_plu_lower (a_uint n, a_real const *L, a_real *y) |
solve the lower triangular system Ly = Pb for y. | |
void | a_real_plu_lower_ (a_uint n, a_real const *L, a_real *y) |
void | a_real_plu_upper (a_uint n, a_real const *U, a_real *x) |
solve the upper triangular system Ux = y for x. | |
void | a_real_plu_upper_ (a_uint n, a_real const *U, a_real *x) |
void | a_real_plu_solve (a_uint n, a_real const *A, a_uint const *p, a_real const *b, a_real *x) |
solve the linear system Ax = b using LU decomposition with partial pivoting. | |
void | a_real_plu_inv (a_uint n, a_real const *A, a_uint const *p, a_real *b, a_real *I) |
compute the inverse of a matrix using its LU decomposition and permutation matrix. | |
void | a_real_plu_inv_ (a_uint n, a_real const *A, a_uint const *p, a_real *I) |
a_real | a_real_plu_det (a_uint n, a_real const *A, int sign) |
compute the determinant of a matrix using its LU decomposition. | |
a_real | a_real_plu_lndet (a_uint n, a_real const *A) |
compute the natural logarithm of the absolute value of the determinant of a matrix using its LU decomposition. | |
int | a_real_plu_sgndet (a_uint n, a_real const *A, int sign) |
compute the sign of the determinant of a matrix using its LU decomposition. | |
int | a_real_ldl (a_uint n, a_real *A) |
compute LDL decomposition of a symmetric matrix. | |
void | a_real_ldl_L (a_uint n, a_real const *__restrict A, a_real *__restrict L) |
extract the lower triangular matrix L from matrix A. | |
void | a_real_ldl_D (a_uint n, a_real const *__restrict A, a_real *__restrict d) |
extract the diagonal vector D from matrix A. | |
void | a_real_ldl_lower (a_uint n, a_real const *L, a_real *y) |
solve the lower triangular system Ly = b for y. | |
void | a_real_ldl_lower_ (a_uint n, a_real const *L, a_real *y) |
void | a_real_ldl_upper (a_uint n, a_real const *L, a_real *x) |
solve the upper triangular system D L^T x = y for x. | |
void | a_real_ldl_upper_ (a_uint n, a_real const *L, a_real *x) |
void | a_real_ldl_solve (a_uint n, a_real const *A, a_real *x) |
solve the linear system Ax = b using the LDL factorization A = LDL^T. | |
void | a_real_ldl_inv (a_uint n, a_real const *A, a_real *b, a_real *I) |
compute the inverse of a matrix using its LDL factorization A = LDL^T. | |
void | a_real_ldl_inv_ (a_uint n, a_real const *A, a_real *I) |
a_real | a_real_ldl_det (a_uint n, a_real const *A) |
compute the determinant of a matrix using its LDL decomposition. | |
a_real | a_real_ldl_lndet (a_uint n, a_real const *A) |
compute the natural logarithm of the absolute value of the determinant of a matrix using its LDL decomposition. | |
int | a_real_ldl_sgndet (a_uint n, a_real const *A) |
compute the sign of the determinant of a matrix using its LDL decomposition. | |
int | a_real_llt (a_uint n, a_real *A) |
compute Cholesky decomposition of a symmetric positive-definite matrix. | |
void | a_real_llt_L (a_uint n, a_real const *__restrict A, a_real *__restrict L) |
extract the lower triangular matrix L from matrix A. | |
void | a_real_llt_lower (a_uint n, a_real const *L, a_real *y) |
solve the lower triangular system Ly = b for y. | |
void | a_real_llt_lower_ (a_uint n, a_real const *L, a_real *y) |
void | a_real_llt_upper (a_uint n, a_real const *L, a_real *x) |
solve the upper triangular system L^T x = y for x. | |
void | a_real_llt_upper_ (a_uint n, a_real const *L, a_real *x) |
void | a_real_llt_solve (a_uint n, a_real const *A, a_real *x) |
solve the linear system Ax = b using the Cholesky factorization A = LL^T. | |
void | a_real_llt_inv (a_uint n, a_real const *A, a_real *b, a_real *I) |
compute the inverse of a matrix using its Cholesky factorization A = LL^T. | |
void | a_real_llt_inv_ (a_uint n, a_real const *A, a_real *I) |
a_real | a_real_llt_det (a_uint n, a_real const *A) |
compute the determinant of a matrix using its Cholesky decomposition. | |
a_real | a_real_llt_lndet (a_uint n, a_real const *A) |
compute the natural logarithm of the absolute value of the determinant of a matrix using its Cholesky decomposition. | |
linear algebra functions