#include #include "nr.h" using namespace std; void NR::ludcmp(Mat_IO_DP &a, Vec_O_INT &indx, DP &d) { const DP TINY=1.0e-20; int i,imax,j,k; DP big,dum,sum,temp; int n=a.nrows(); Vec_DP vv(n); d=1.0; for (i=0;i big) big=temp; if (big == 0.0) nrerror("Singular matrix in routine ludcmp"); vv[i]=1.0/big; } for (j=0;j= big) { big=dum; imax=i; } } if (j != imax) { for (k=0;k