#include #include #include #include #include "nr.h" using namespace std; // Driver for routine qrsolv int main(void) { bool sing; int j,k,l,m,n; string txt; ifstream fp("matrx1.dat"); if (fp.fail()) NR::nrerror("Data file matrx1.dat not found"); cout << fixed << setprecision(6); getline(fp,txt); while (!fp.eof()) { getline(fp,txt); fp >> n >> m; getline(fp,txt); Vec_DP x(n),c(n),d(n); Mat_DP a(n,n),b(n,n),ai(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); // Save matrix a for later testing for (l=0;l