Commit Graph

17 Commits

Author SHA1 Message Date
Thomas Capricelli
878f15b8a5 * use eigen object for callbacks for hybrd and lmdif
* use Functor instead of argument for ei_fdjac*()
2009-08-23 04:06:16 +02:00
Thomas Capricelli
1225704753 we do not need/use the 'void *p' parameter 2009-08-23 01:59:20 +02:00
Thomas Capricelli
aa3a7c3303 raw import of covar() : this is the last one, and we now do not depend on
the cminpack library anymore.
2009-08-22 06:44:41 +02:00
Thomas Capricelli
16061a46db Now that the main algorithms are imported into eigen, we import subroutines
used by those algorithms (aka "second level").

This is a row import : we copy/paste the files from cminpack and make
very few changes :
* template<Scalar> them (replace double)
* dpmpar() replaced by c++ standard equivalent
* abs/fabs/sqrt/min/max replaced by ei_* or std::*
* use eigen norms instead of enorm()

Important Notes:
* The use of stableNorm() was not enough in some cases, but using
  blueNorm() instead fixed the problems (some tests gave bad results,
  either in number of iterations or precision of the results)
* As a whole, the only test that changed is testNistMGH17() : it now takes
  some few steps less to get the same result. So this is a small improvement.

After this commit, the only remaining dependency from the cminpack
static library is 'covar', only used from the tests.
2009-08-22 06:40:22 +02:00
Thomas Capricelli
11c3762068 cleaning : removing #define, use std:min() and such 2009-08-22 05:29:33 +02:00
Thomas Capricelli
20480a5438 merging ei_lmdif() and lmdif_template() 2009-08-21 04:24:59 +02:00
Thomas Capricelli
1ad042c981 rename i__ to i. i really wonder how f2c can produce such things 2009-08-21 00:26:37 +02:00
Thomas Capricelli
b09ebe01da * porting lmdif1 to eigen
* qtf was missing in lmdif signature (this is an output of the method)
2009-08-20 22:59:09 +02:00
Thomas Capricelli
b423e640a6 porting hybrj1 to eigen 2009-08-20 22:41:56 +02:00
Thomas Capricelli
6027c4bedf porting hybrd1 to eigen 2009-08-20 22:36:24 +02:00
Thomas Capricelli
de7d14b2b3 porting lmstr1 to eigen 2009-08-20 22:16:30 +02:00
Thomas Capricelli
980c40f72c porting lmder1 to eigen (no more wrapper) 2009-08-20 22:09:05 +02:00
Thomas Capricelli
9a876806e1 use eigen stableNorm() instead of cminpack 'enorm'. The results are mostly
slightly better in tests (one test needs 15 iterations intead of 16, for
the same result). Some numerical results have improved slightly, too.

If one uses blueNorm() instead, an assert for 'overflow' is raised from
blueNorm()
2009-08-20 21:04:38 +02:00
Thomas Capricelli
01622e9855 use machine precision from eigen instead of the one from cminpack. The test
pass though they would not if using a value of 2.220e-16 (the real value
for 'double' is 2.22044604926e-16). How sensitive those tests are :)
2009-08-19 19:56:51 +02:00
Thomas Capricelli
fb54cfb013 import main files from cminpack as *.h files:
* function names are changed by appending _template
* it uses basic templating : template<typename T>
* wrappers now use those versions instead of the ones from cminpack
* lot of external methods from cminpack are still used
* tests pass though they are unchanged (they use wrappers)
2009-08-19 18:38:45 +02:00
Thomas Capricelli
953c37f8e5 i wonder how useful this really is, but others do this way. Probably
related to doxygen.
2009-08-09 05:14:45 +02:00
Thomas Capricelli
d646d99366 Start of module "NonLinear". We start out of cminpack-1.0.2
(http://devernay.free.fr/hacks/cminpack.html)
The first test is adapted from the example/ directory.
Some stuff is hard coded for our initial tests.
2009-08-08 22:18:48 +02:00