|
double | vvdot (double const *a, double const *b, int n) |
|
void | mvdot (double *r, double **m, double const *v, int n1, int n2) |
|
int | ludcmp (double **a, int n, int *indx) |
|
void | lubksb (double **a, int n, int *indx, double *b) |
|
void | leastsq (double **A, double *b, int n1, int n2) |
|
void | tridiag (int n, double *a, double *b, double *c, double *r, double *u, int pivot_type) |
|
void | band_decomp (int n, int m1, int m2, double *a, double *al, int *index, double *d) |
|
void | band_back_sub (int n, int m1, int m2, double *a, double *al, int *index, double *b) |
|
void | band_multiply (int n, int m1, int m2, double *a, double *x, double *b) |
|
void | band_improve (int n, int m1, int m2, double *aorig, double *a, double *al, int *index, double *b, double *x) |
|
int ludcmp |
( |
double ** |
a, |
|
|
int |
n, |
|
|
int * |
indx |
|
) |
| |
Given a matrix a[0..n-1][0..n-1], this routine replaces it by the LU decomposition of a rowwise permutation of itself. a and n are input. a is output, arranged as in NRIC equation (2.3.14) ; indx[0..n-1] is an output vector that records the row permutation effected by the partial pivoting; d is output as +/- 1 depending on whether the number of row interchanges was evenor odd, respectively. This routine is used in combination with lubksbto solve linear equationsor invert a matrix. adapted from Numerical Recipes in C, 2nd Ed., p. 46.
Definition at line 14 of file ludcmp.c.
void lubksb |
( |
double ** |
a, |
|
|
int |
n, |
|
|
int * |
indx, |
|
|
double * |
b |
|
) |
| |
Solves the set of n linear equations A X = B. Here a[0..n-1][0..n-1] is input, not as the matrix A but rather as its LU decomposition, determined by the routine ludcmp. indx[0..n-1] is input as the permutation vector returned by ludcmp. b[0..n-1] is input as the right-hand side vector B, and returns with the solution vector X. a, n, and indx are not modified by this routine and can be left in place for successive calls with different right-hand sides b. This routine takes into account the possibility that b will begin with many zero elements, so it is efficient for use in matrix inversion. adapted from Numerical Recipes in C, 2nd Ed., p. 47.
Definition at line 14 of file lubksb.c.