Go to the documentation of this file.
29 #include <o2scl/err_hnd.h>
30 #include <o2scl/permutation.h>
31 #include <o2scl/cblas.h>
35 #define O2SCL_IX(V,i) V[i]
36 #define O2SCL_IX2(M,i,j) M(i,j)
37 #include <o2scl/lu_base.h>
59 for (j = 0; j < N - 1; j++) {
62 double ajj, max = fabs(A[j][j]);
65 for (i = j + 1; i < N; i++) {
66 double aij = fabs (A[i][j]);
78 double *r1=&(A[j][0]);
79 double *r2=&(A[i_pivot][0]);
92 for (i = j + 1; i < N; i++) {
93 double aij = A[i][j] / ajj;
95 for (k = j + 1; k < N; k++) {
98 A[i][k]=aik - aij * ajk;
107 #define O2SCL_IX(V,i) V[i]
108 #define O2SCL_IX2(M,i,j) M[i][j]
109 #include <o2scl/lu_base.h>
int swap(const size_t i, const size_t j)
Swap two elements of a permutation.
The namespace for linear algebra classes and functions.
A class for representing permutations.
int init()
Initialize permutation to the identity.
int LU_decomp_array_2d(const size_t n, double A[][N], o2scl::permutation &p, int &signum)
Specialized version of LU_decomp for C-style 2D arrays.
The namespace for linear algebra classes and functions with operator()
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).