- vector<vector<double> > G = matrix;
- //vector<vector<double> > copy_G;
-
- for(int count=0;count<2;count++){
- linearCalc.recenter(offset, matrix, G); if (m->control_pressed) { return 0; }
- linearCalc.tred2(G, d, e); if (m->control_pressed) { return 0; }
- linearCalc.qtli(d, e, G); if (m->control_pressed) { return 0; }
- offset = d[d.size()-1];
- if(offset > 0.0) break;
- }
+
+ linearCalc.tred2(crossProduct, d, e); if (m->control_pressed) { return 0; }
+ linearCalc.qtli(d, e, crossProduct); if (m->control_pressed) { return 0; }
+
+ vector<vector<double> > X = linearCalc.matrix_mult(centered, crossProduct);