liba 0.1.15
An algorithm library based on C/C++
 
Loading...
Searching...
No Matches
linalg.h
Go to the documentation of this file.
1
5
6#ifndef LIBA_LINALG_H
7#define LIBA_LINALG_H
8
9#include "a.h"
10
16
17#if defined(__cplusplus)
18extern "C" {
19#endif /* __cplusplus */
20
26A_EXTERN void a_linalg_T1(a_float *A, a_uint n);
27
35A_EXTERN void a_linalg_T2(a_float *__restrict T, a_float const *__restrict A, a_uint m, a_uint n);
36
44A_EXTERN a_float a_linalg_dot(a_float const *X, a_float const *Y, a_size n);
45
75A_EXTERN void a_linalg_mulmm(a_float *__restrict Z, a_float const *__restrict X, a_float const *__restrict Y, a_uint row, a_uint c_r, a_uint col);
76
117A_EXTERN void a_linalg_mulTm(a_float *__restrict Z, a_float const *__restrict X, a_float const *__restrict Y, a_uint c_r, a_uint row, a_uint col);
118
148A_EXTERN void a_linalg_mulmT(a_float *__restrict Z, a_float const *__restrict X, a_float const *__restrict Y, a_uint row, a_uint col, a_uint c_r);
149
179A_EXTERN void a_linalg_mulTT(a_float *__restrict Z, a_float const *__restrict X, a_float const *__restrict Y, a_uint row, a_uint c_r, a_uint col);
180
197A_EXTERN int a_linalg_plu(a_float *A, a_uint n, a_uint *p, int *sign);
198
205A_EXTERN void a_linalg_plu_get_P(a_uint const *p, a_uint n, a_float *P);
206
213A_EXTERN void a_linalg_plu_get_L(a_float const *A, a_uint n, a_float *L);
214
221A_EXTERN void a_linalg_plu_get_U(a_float const *A, a_uint n, a_float *U);
222
230A_EXTERN void a_linalg_plu_apply(a_uint const *p, a_uint n, a_float const *b, a_float *Pb);
231
238A_EXTERN void a_linalg_plu_lower(a_float const *L, a_uint n, a_float *y);
239
246A_EXTERN void a_linalg_plu_upper(a_float const *U, a_uint n, a_float *x);
247
256A_EXTERN void a_linalg_plu_solve(a_float const *A, a_uint n, a_uint const *p, a_float const *b, a_float *x);
257
266A_EXTERN void a_linalg_plu_inv(a_float const *A, a_uint n, a_uint const *p, a_float *b, a_float *I);
267
275A_EXTERN a_float a_linalg_plu_det(a_float const *A, a_uint n, int sign);
276
284
292A_EXTERN int a_linalg_plu_sgndet(a_float const *A, a_uint n, int sign);
293
302A_EXTERN int a_linalg_cho(a_float *A, a_uint n);
303
310A_EXTERN void a_linalg_cho_get_L(a_float const *A, a_uint n, a_float *L);
311
318A_EXTERN void a_linalg_cho_lower(a_float const *L, a_uint n, a_float *y);
319
326A_EXTERN void a_linalg_cho_upper(a_float const *L, a_uint n, a_float *x);
327
334A_EXTERN void a_linalg_cho_solve(a_float const *A, a_uint n, a_float *x);
335
343A_EXTERN void a_linalg_cho_inv(a_float const *A, a_uint n, a_float *b, a_float *I);
344
345#if defined(__cplusplus)
346} /* extern "C" */
347#endif /* __cplusplus */
348
350
351#endif /* a/linalg.h */
algorithm library
double a_float
compiler built-in floating-point number type
Definition a.h:1003
a_float a_linalg_plu_det(a_float const *A, a_uint n, int sign)
compute the determinant of a matrix using its LU decomposition.
void a_linalg_T2(a_float *__restrict T, a_float const *__restrict A, a_uint m, a_uint n)
transpose a given m x n matrix A into an n x m matrix T.
void a_linalg_plu_get_U(a_float const *A, a_uint n, a_float *U)
extract the upper triangular matrix U from matrix A.
void a_linalg_cho_get_L(a_float const *A, a_uint n, a_float *L)
extract the lower triangular matrix L from matrix A.
int a_linalg_cho(a_float *A, a_uint n)
compute Cholesky decomposition of a symmetric positive-definite matrix.
void a_linalg_mulmm(a_float *__restrict Z, a_float const *__restrict X, a_float const *__restrict Y, a_uint row, a_uint c_r, a_uint col)
multiply two matrices X and Y, storing the result in Z.
void a_linalg_plu_upper(a_float const *U, a_uint n, a_float *x)
solve the upper triangular system Ux = y for x.
int a_linalg_plu_sgndet(a_float const *A, a_uint n, int sign)
compute the sign of the determinant of a matrix using its LU decomposition.
void a_linalg_plu_get_P(a_uint const *p, a_uint n, a_float *P)
construct the permutation matrix P from a permutation vector p.
void a_linalg_cho_upper(a_float const *L, a_uint n, a_float *x)
solve the upper triangular system L^T x = y for x.
void a_linalg_plu_inv(a_float const *A, a_uint n, a_uint const *p, a_float *b, a_float *I)
compute the inverse of a matrix using its LU decomposition and permutation matrix.
void a_linalg_plu_apply(a_uint const *p, a_uint n, a_float const *b, a_float *Pb)
apply the permutation P to the vector b, producing Pb.
a_float a_linalg_plu_lndet(a_float const *A, a_uint n)
compute the natural logarithm of the absolute value of the determinant of a matrix using its LU decom...
void a_linalg_mulTT(a_float *__restrict Z, a_float const *__restrict X, a_float const *__restrict Y, a_uint row, a_uint c_r, a_uint col)
multiply the transpose of matrix X with the transpose of matrix Y, storing the result in Z.
void a_linalg_plu_solve(a_float const *A, a_uint n, a_uint const *p, a_float const *b, a_float *x)
solve the linear system Ax = b using LU decomposition with partial pivoting.
void a_linalg_mulTm(a_float *__restrict Z, a_float const *__restrict X, a_float const *__restrict Y, a_uint c_r, a_uint row, a_uint col)
multiply the transpose of matrix X with matrix Y, storing the result in Z.
void a_linalg_cho_inv(a_float const *A, a_uint n, a_float *b, a_float *I)
compute the inverse of a matrix using its Cholesky factorization A = LL^T.
a_float a_linalg_dot(a_float const *X, a_float const *Y, a_size n)
compute the dot product of two vectors.
void a_linalg_plu_get_L(a_float const *A, a_uint n, a_float *L)
extract the lower triangular matrix L from matrix A.
void a_linalg_plu_lower(a_float const *L, a_uint n, a_float *y)
solve the lower triangular system Ly = Pb for y.
int a_linalg_plu(a_float *A, a_uint n, a_uint *p, int *sign)
compute LU decomposition of a square matrix with partial pivoting.
void a_linalg_T1(a_float *A, a_uint n)
transpose an n x n square matrix in-place.
void a_linalg_cho_solve(a_float const *A, a_uint n, a_float *x)
solve the linear system Ax = b using the Cholesky factorization A = LL^T.
void a_linalg_mulmT(a_float *__restrict Z, a_float const *__restrict X, a_float const *__restrict Y, a_uint row, a_uint col, a_uint c_r)
multiply matrix X with the transpose of matrix Y, storing the result in Z.
void a_linalg_cho_lower(a_float const *L, a_uint n, a_float *y)
solve the lower triangular system Ly = b for y.
unsigned int a_uint
unsigned integer type is guaranteed to be at least 16 bits
Definition a.h:337
size_t a_size
unsigned integer type returned by the sizeof operator
Definition a.h:823