Blob Blame History Raw
--- fityk/fit.cpp.orig	2014-03-08 20:42:18.876972123 -0600
+++ fityk/fit.cpp	2014-03-08 20:43:43.824323999 -0600
@@ -15,7 +15,6 @@
 #include "settings.h"
 #include "var.h"
 #include "LMfit.h"
-#include "CMPfit.h"
 #include "GAfit.h"
 #include "NMfit.h"
 #include "NLfit.h"
@@ -293,38 +292,6 @@
     }
 }
 
-// similar to compute_derivatives(), but adjusted for MPFIT interface
-void Fit::compute_derivatives_mp(const vector<realt> &A,
-                                 const vector<DataAndModel*>& dms,
-                                 double **derivs, double *deviates)
-{
-    ++evaluations_;
-    F_->mgr.use_external_parameters(A);
-    int ntot = 0;
-    v_foreach (DataAndModel*, i, dms) {
-        ntot += compute_derivatives_mp_for(*i, ntot, derivs, deviates);
-    }
-}
-
-int Fit::compute_derivatives_mp_for(const DataAndModel* dm, int offset,
-                                    double **derivs, double *deviates)
-{
-    const Data* data = dm->data();
-    int n = data->get_n();
-    vector<realt> xx = data->get_xx();
-    vector<realt> yy(n, 0.);
-    const int dyn = na_+1;
-    vector<realt> dy_da(n*dyn, 0.);
-    dm->model()->compute_model_with_derivs(xx, yy, dy_da);
-    for (int i = 0; i != n; ++i)
-        deviates[offset+i] = (data->get_y(i) - yy[i]) / data->get_sigma(i);
-    for (int j = 0; j != na_; ++j)
-        if (derivs[j] != NULL)
-            for (int i = 0; i != n; ++i)
-                derivs[j][offset+i] = -dy_da[i*dyn+j] / data->get_sigma(i);
-    return n;
-}
-
 // similar to compute_derivatives(), but adjusted for NLopt interface
 realt Fit::compute_derivatives_nl(const vector<realt> &A,
                                   const vector<DataAndModel*>& dms,
@@ -682,7 +649,6 @@
 {
     // these methods correspond to fit_method_enum[]
     methods_.push_back(new LMfit(F_, fit_method_enum[0]));
-    methods_.push_back(new MPfit(F_, fit_method_enum[1]));
     methods_.push_back(new NMfit(F_, fit_method_enum[2]));
     methods_.push_back(new GAfit(F_, fit_method_enum[3]));
 #if HAVE_LIBNLOPT
@@ -701,7 +667,6 @@
 const char* FitMethodsContainer::full_method_names[][2] =
 {
     { "Levenberg-Marquardt",     "gradient based method" },
-    { "MPFIT (another Lev-Mar)", "alternative Lev-Mar implementation" },
     { "Nelder-Mead Simplex",     "slow but simple and reliable method" },
     { "Genetic Algorithm",       "not really maintained" },
 #if HAVE_LIBNLOPT