Commit c476bf33 authored by Ian Humphrey's avatar Ian Humphrey
Browse files

Cherry-picked r6957 (hicalbeta's NonLinearLSQ.cpp gsl changes) into IPCE. This...

Cherry-picked r6957 (hicalbeta's NonLinearLSQ.cpp gsl changes) into IPCE. This allows hicalbeta to compile with new gsl library added to local third-party areas.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7048 41f8697f-d340-4b68-9986-7bafba869bb8
parent 6cc5e456
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -68,13 +68,15 @@ int NonLinearLSQ::curvefit() {
                  gsl_blas_dnrm2(s->f), GSL_CONTINUE);


  gsl_matrix *J = gsl_matrix_alloc(n, p);
  do {
    _nIters++;

    _status = gsl_multifit_fdfsolver_iterate(s);
    _fitParms = gslToNlsq(s->x);

    gsl_multifit_covar(s->J, 0.0, covar);
    gsl_multifit_fdfsolver_jac(s, J);
    gsl_multifit_covar(J, 0.0, covar);
    _uncert = getUncertainty(covar);

    _status = checkIteration(_nIters, _fitParms, _uncert, gsl_blas_dnrm2(s->f),
@@ -88,6 +90,7 @@ int NonLinearLSQ::curvefit() {
  // Clean up
  gsl_multifit_fdfsolver_free(s);
  gsl_matrix_free(covar);
  gsl_matrix_free(J);

  return (_status);
}