Public Functions
int | matrixc_print( |
int | matrixc_add( |
int | matrixc_sub( |
int | matrixc_pmul( |
int | matrixc_pdiv( |
int | matrixc_mul( |
int | matrixc_div( |
double complex | matrixc_det( |
int | matrixc_trans( |
int | matrixc_hermitian( |
int | matrixc_mul_transpose( |
int | matrixc_transpose_mul( |
int | matrixc_mul_hermitian( |
int | matrixc_hermitian_mul( |
int | matrixc_aug( |
int | matrixc_inv( |
int | matrixc_eye( |
int | matrixc_ones( |
int | matrixc_zeros( |
int | matrixc_gjelim( |
int | matrixc_pivot( |
int | matrixc_swaprows( |
int | matrixc_linsolve( |
int | matrixc_cgsolve( |
int | matrixc_ludecomp_crout( |
int | matrixc_ludecomp_doolittle( |
int | matrixc_gramschmidt( |
int | matrixc_qrdecomp_gramschmidt( |
int | matrixc_chol( |
Interfaces
int matrixc_print(
Print array as matrix to stdout
- _x : input matrix, shape: (_r, _c)
- _r : rows in matrix
- _c : columns in matrix
int matrixc_add(
Perform point-wise addition between two matrices and , saving the result in the output matrix . That is, , and
- _x : input matrix, shape: (_r, _c)
- _y : input matrix, shape: (_r, _c)
- _z : output matrix, shape: (_r, _c)
- _r : number of rows in each matrix
- _c : number of columns in each matrix
int matrixc_sub(
Perform point-wise subtraction between two matrices and , saving the result in the output matrix That is, , and
- _x : input matrix, shape: (_r, _c)
- _y : input matrix, shape: (_r, _c)
- _z : output matrix, shape: (_r, _c)
- _r : number of rows in each matrix
- _c : number of columns in each matrix
int matrixc_pmul(
Perform point-wise multiplication between two matrices and , saving the result in the output matrix That is, , and
- _x : input matrix, shape: (_r, _c)
- _y : input matrix, shape: (_r, _c)
- _z : output matrix, shape: (_r, _c)
- _r : number of rows in each matrix
- _c : number of columns in each matrix
int matrixc_pdiv(
Perform point-wise division between two matrices and , saving the result in the output matrix That is, , and
- _x : input matrix, shape: (_r, _c)
- _y : input matrix, shape: (_r, _c)
- _z : output matrix, shape: (_r, _c)
- _r : number of rows in each matrix
- _c : number of columns in each matrix
int matrixc_mul(
Multiply two matrices and , storing the result in . NOTE: _rz = _rx, _cz = _cy, and _cx = _ry
- _x : input matrix, shape: (_rx, _cx)
- _rx : number of rows in _x
- _cx : number of columns in _x
- _y : input matrix, shape: (_ry, _cy)
- _ry : number of rows in _y
- _cy : number of columns in _y
- _z : output matrix, shape: (_rz, _cz)
- _rz : number of rows in _z
- _cz : number of columns in _z
int matrixc_div(
Solve for for square matrices of size
- _x : input matrix, shape: (_n, _n)
- _y : input matrix, shape: (_n, _n)
- _z : output matrix, shape: (_n, _n)
- _n : number of rows and columns in each matrix
double complex matrixc_det(
Compute the determinant of a square matrix
- _x : input matrix, shape: (_r, _c)
- _r : rows
- _c : columns
int matrixc_trans(
Compute the in-place transpose of the matrix
- _x : input matrix, shape: (_r, _c)
- _r : rows
- _c : columns
int matrixc_hermitian(
Compute the in-place Hermitian transpose of the matrix
- _x : input matrix, shape: (_r, _c)
- _r : rows
- _c : columns
int matrixc_mul_transpose(
Compute on a matrix. The result is a matrix.
- _x : input matrix, shape: (_m, _n)
- _m : input rows
- _n : input columns
- _xxT : output matrix, shape: (_m, _m)
int matrixc_transpose_mul(
Compute on a matrix. The result is a matrix.
- _x : input matrix, shape: (_m, _n)
- _m : input rows
- _n : input columns
- _xTx : output matrix, shape: (_n, _n)
int matrixc_mul_hermitian(
Compute on a matrix. The result is a matrix.
- _x : input matrix, shape: (_m, _n)
- _m : input rows
- _n : input columns
- _xxH : output matrix, shape: (_m, _m)
int matrixc_hermitian_mul(
Compute on a matrix. The result is a matrix.
- _x : input matrix, shape: (_m, _n)
- _m : input rows
- _n : input columns
- _xHx : output matrix, shape: (_n, _n)
int matrixc_aug(
Augment two matrices and , storing the result in NOTE: _rz = _rx = _ry, _rx = _ry, and _cz = _cx + _cy
- _x : input matrix, shape: (_rx, _cx)
- _rx : number of rows in _x
- _cx : number of columns in _x
- _y : input matrix, shape: (_ry, _cy)
- _ry : number of rows in _y
- _cy : number of columns in _y
- _z : output matrix, shape: (_rz, _cz)
- _rz : number of rows in _z
- _cz : number of columns in _z
int matrixc_inv(
Compute the inverse of a square matrix
- _x : input/output matrix, shape: (_r, _c)
- _r : rows
- _c : columns
int matrixc_eye(
Generate the identity square matrix of size
- _x : output matrix, shape: (_n, _n)
- _n : dimensions of _x
int matrixc_ones(
Generate the all-ones matrix of size
- _x : output matrix, shape: (_r, _c)
- _r : rows
- _c : columns
int matrixc_zeros(
Generate the all-zeros matrix of size
- _x : output matrix, shape: (_r, _c)
- _r : rows
- _c : columns
int matrixc_gjelim(
Perform Gauss-Jordan elimination on matrix
- _x : input/output matrix, shape: (_r, _c)
- _r : rows
- _c : columns
int matrixc_pivot(
Pivot on element
- _x : output matrix, shape: (_r, _c)
- _r : rows of _x
- _c : columns of _x
- _i : pivot row
- _j : pivot column
int matrixc_swaprows(
Swap rows _r1 and _r2 of matrix
- _x : input/output matrix, shape: (_r, _c)
- _r : rows of _x
- _c : columns of _x
- _r1 : first row to swap
- _r2 : second row to swap
int matrixc_linsolve(
Solve linear system of equations:
- _A : system matrix, shape: (_n, _n)
- _n : system size
- _b : equality vector, shape: (_n, 1)
- _x : solution vector, shape: (_n, 1)
- _opts : options (ignored for now)
int matrixc_cgsolve(
Solve linear system of equations using conjugate gradient method.
- _A : symmetric positive definite square matrix
- _n : system dimension
- _b : equality, shape: (_n, 1)
- _x : solution estimate, shape: (_n, 1)
- _opts : options (ignored for now)
int matrixc_ludecomp_crout(
Perform L/U/P decomposition using Crout's method
- _x : input/output matrix, shape: (_rx, _cx)
- _rx : rows of _x
- _cx : columns of _x
- _l : first row to swap
- _u : first row to swap
- _p : first row to swap
int matrixc_ludecomp_doolittle(
Perform L/U/P decomposition, Doolittle's method
- _x : input/output matrix, shape: (_rx, _cx)
- _rx : rows of _x
- _cx : columns of _x
- _l : first row to swap
- _u : first row to swap
- _p : first row to swap
int matrixc_gramschmidt(
Perform orthnormalization using the Gram-Schmidt algorithm
- _A : input matrix, shape: (_r, _c)
- _r : rows
- _c : columns
- _v : output matrix
int matrixc_qrdecomp_gramschmidt(
Perform Q/R decomposition using the Gram-Schmidt algorithm such that and and \(\vec{R\}\) is a diagonal \(m \times m\) matrix NOTE: all matrices are square
- _a : input matrix, shape: (_m, _m)
- _m : rows
- _n : columns (same as cols)
- _q : output matrix, shape: (_m, _m)
- _r : output matrix, shape: (_m, _m)
int matrixc_chol(
Compute Cholesky decomposition of a symmetric/Hermitian positive-definite matrix as
- _a : input square matrix, shape: (_n, _n)
- _n : input matrix dimension
- _l : output lower-triangular matrix