const vector<double> &y,
vector<double> &coef);
-
+
private:
TPolyFit &operator = (const TPolyFit &); // disable assignment
TPolyFit(); // and instantiation
TPolyFit(const TPolyFit&); // and copying
-
+
static void Square (const Matrix &x, // Matrix multiplication routine
const vector<double> &y,
Matrix &a, // A = transpose X times X
// nterms = coefs.size()
// npoints = x.size()
{
- int i, j;
+ unsigned int i, j;
double xi, yi, yc, srs, sum_y, sum_y2;
Matrix xmatr; // Data matrix
Matrix a;
vector<double> g; // Constant vector
- const int npoints(x.size());
- const int nterms(coefs.size());
+ const unsigned int npoints(x.size());
+ const unsigned int nterms(coefs.size());
double correl_coef;
zeroise(g, nterms);
zeroise(a, nterms, nterms);
for( int i = 0; i < ncol; ++i)
coef[i] = w[i][0];
-
-
+
+
return true;
} // end; { procedure GaussJordan }
//----------------------------------------------------------------------------------------------
{
//GaussJordan2; // first half of GaussJordan
// actual start of gaussj
-
+
double big, t;
double pivot;
double determ;
- int irow, icol;
+ int irow = 0;
+ int icol = 0;
int ncol(b.size());
int nv = 1; // single constant vector
for(int i = 0; i < ncol; ++i)
#endif
-
+