#include #include #include #include #include "nr.h" using namespace std; // Driver for routine svbksb, which calls routine svdcmp int main(void) { int j,k,l,m,n; string txt; DP wmax,wmin; ifstream fp("matrx1.dat"); if (fp.fail()) NR::nrerror("Data file matrx1.dat not found"); getline(fp,txt); while (!fp.eof()) { getline(fp,txt); fp >> n >> m; getline(fp,txt); Vec_DP w(n),x(n),c(n); Mat_DP a(n,n),b(n,m),u(n,n),v(n,n); getline(fp,txt); for (k=0;k> a[k][l]; getline(fp,txt); getline(fp,txt); for (l=0;l> b[k][l]; getline(fp,txt); getline(fp,txt); // copy a into u for (k=0;k wmax) wmax=w[k]; // define "small" wmin=wmax*(1.0e-6); // zero the "small" singular values for (k=0;k