Go to the source code of this file.
Macros | |
#define | SIGN(a, b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) |
#define | IMIN(a, b) |
#define | DMAX(a, b) |
#define | DSQR(a) ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg) |
Functions | |
int | ludcmp (double **a, int n, int *indx, double *d) |
LU decomposition of a matrix with index starting at 1. More... | |
int | ludcmp_0 (double **a, int n, int *indx, double *d) |
LU decomposition of a matrix with index starting at 0. More... | |
void | lubksb (double **a, int n, int *indx, double b[]) |
void | lubksb_0 (double **a, int n, int *indx, double b[]) |
int | choldc (double **a, int n, double p[]) |
Compute the Cholesky decomposition of a, i.e. More... | |
int | choldc_0 (double **a, int n, double *p) |
void | cholsl (double **a, int n, double p[], double b[], double x[]) |
void | cholsl_0 (double **a, int n, double *p, double *b, double *x) |
void | svdcmp (double **a, int m, int n, double w[], double **v) |
computes the Singular Value Decomposition a = u.w.v' More... | |
void | svdcmp_0 (double **a, int m, int n, double w[], double **v) |
computes the Singular Value Decomposition a = u.w.v' More... | |
void | svbksb (double **u, double w[], double **v, int m, int n, double b[], double x[]) |
void | svbksb_0 (double **u, double w[], double **v, int m, int n, double b[], double x[]) |
void | gaussj (double **a, int n, double **b, int m) |
This c header file declares various functions about linear algebra.
Creation date: 2006
(c) Universite catholique de Louvain
#define DMAX | ( | a, | |
b | |||
) |
#define IMIN | ( | a, | |
b | |||
) |
#define SIGN | ( | a, | |
b | |||
) | ((b) >= 0.0 ? fabs(a) : -fabs(a)) |
int choldc | ( | double ** | a, |
int | n, | ||
double | p[] | ||
) |
Compute the Cholesky decomposition of a, i.e.
the lower triangular matrix L such that a=L*L'
Elements off diagonal are stored directly in a. Diagonal elements are stored in p.
WARNING: a is modified !
int choldc_0 | ( | double ** | a, |
int | n, | ||
double * | p | ||
) |
void cholsl | ( | double ** | a, |
int | n, | ||
double | p[], | ||
double | b[], | ||
double | x[] | ||
) |
void cholsl_0 | ( | double ** | a, |
int | n, | ||
double * | p, | ||
double * | b, | ||
double * | x | ||
) |
void gaussj | ( | double ** | a, |
int | n, | ||
double ** | b, | ||
int | m | ||
) |
void lubksb | ( | double ** | a, |
int | n, | ||
int * | indx, | ||
double | b[] | ||
) |
void lubksb_0 | ( | double ** | a, |
int | n, | ||
int * | indx, | ||
double | b[] | ||
) |
int ludcmp | ( | double ** | a, |
int | n, | ||
int * | indx, | ||
double * | d | ||
) |
LU decomposition of a matrix with index starting at 1.
[in,out] | a | Input and output matrix with index starting at 1. |
[in] | n | size of the square matrix a : [n x n] . |
[out] | indx | Row permutations with index starting at 1. |
[out] | d | +1 if the number of row interchange is even, -1 if it is odd. |
int ludcmp_0 | ( | double ** | a, |
int | n, | ||
int * | indx, | ||
double * | d | ||
) |
LU decomposition of a matrix with index starting at 0.
[in,out] | a | Input and output matrix with index starting at 0. |
[in] | n | size of the square matrix a : [n x n]. |
[out] | indx | Row permutations with index starting at 0. |
[out] | d | +1 if the number of row interchange is even, -1 if it is odd. |
void svbksb | ( | double ** | u, |
double | w[], | ||
double ** | v, | ||
int | m, | ||
int | n, | ||
double | b[], | ||
double | x[] | ||
) |
void svbksb_0 | ( | double ** | u, |
double | w[], | ||
double ** | v, | ||
int | m, | ||
int | n, | ||
double | b[], | ||
double | x[] | ||
) |
void svdcmp | ( | double ** | a, |
int | m, | ||
int | n, | ||
double | w[], | ||
double ** | v | ||
) |
computes the Singular Value Decomposition a = u.w.v'
The output matrix u is stored in the input matrix a.
The given arrays size is the minimum size, bigger arrays are acceptable. Indeed, the function will only use the first N elements of a 1D array or the first N rows and M columns of 2D arrays. Giving an oversized array as input (for example one of mbs_aux->... that is initialized at the system maximum possible size) is not an issue.
[in,out] | a | the input matrix, with index starting at 1, to be decomposed. The content is modified to be the output matrix u. Its size must at least be m x n (0 element not taken into account). |
[in] | m | the number of rows (0 element not taken into account) of the matrix a. |
[in] | n | the number of columns (0 element not taken into account) of the matrix a. |
[out] | w | the vector, with index starting at 1, to store the singular values. |
[out] | v | the matrix v (not the transpose) of size n x n (0 element not taken into account). |
void svdcmp_0 | ( | double ** | a, |
int | m, | ||
int | n, | ||
double | w[], | ||
double ** | v | ||
) |
computes the Singular Value Decomposition a = u.w.v'
The output matrix u is stored in the input matrix a. The given arrays size are minimum size, bigger arrays are acceptable.
[in,out] | a | the input matrix, with index starting at 0, to be decomposed. The content is modified to be the output matrix u. Its size must be m x n. |
[in] | m | the number of rows of the matrix a. |
[in] | n | the number of columns of the matrix a. |
[out] | w | the vector, with index starting at 0, to store the singular values. |
[out] | v | the matrix v (not the transpose) of size n x n. |