Commit Graph

72 Commits

Author SHA1 Message Date
Thomas Capricelli
613a464320 cleaning 2009-08-25 16:48:09 +02:00
Thomas Capricelli
6c1a9703b1 move most of results vectors/matrices inside respective classes. 2009-08-25 16:08:09 +02:00
Thomas Capricelli
201f58e528 merge both c methods lmstr/lmstr1 into one class
LevenbergMarquardtOptimumStorage with two methods.
2009-08-25 14:18:38 +02:00
Thomas Capricelli
3f1b81e129 merge both c methods lmdif/lmdif1 into one class
LevenbergMarquardtNumericalDiff with two methods.
2009-08-25 14:09:19 +02:00
Thomas Capricelli
a736378331 cleaning 2009-08-25 14:03:30 +02:00
Thomas Capricelli
d880e6f774 merge both c methods hybrj1/hybrj into one class HybridNonLinearSolver with
two methods. hybrd stuff renamed to HybridNonLinearSolverNumericalDiff.
2009-08-25 13:56:25 +02:00
Thomas Capricelli
a043708e87 merge both c methods hybrd/hybrd1 into one class HybridNonLinearSolver with
two methods.
2009-08-25 13:48:25 +02:00
Thomas Capricelli
602b13815f merge both c methods lmder/lmder1 into one class LevenbergMarquardt with
two methods.
2009-08-25 13:40:45 +02:00
Thomas Capricelli
45442b8d41 some more work on Functors 2009-08-24 21:48:22 +02:00
Thomas Capricelli
15d2c3af90 playing with functors 2009-08-24 19:45:35 +02:00
Thomas Capricelli
6f567f10be cleaning 2009-08-24 19:19:30 +02:00
Thomas Capricelli
4e62e29869 cleaning covar 2009-08-24 17:49:37 +02:00
Thomas Capricelli
17905c7399 eigenization of ei_covar() 2009-08-24 17:47:35 +02:00
Thomas Capricelli
92a5bb4539 clean debug stuff 2009-08-24 16:14:42 +02:00
Thomas Capricelli
e65a7c7c70 misc cleaning 2009-08-24 09:28:29 +02:00
Thomas Capricelli
950eb4a254 various cleaning and homogeneization 2009-08-24 08:28:31 +02:00
Thomas Capricelli
134dea76d3 beautify functors for lmdif, lmstr, hybrj, hybrd 2009-08-23 04:57:48 +02:00
Thomas Capricelli
acd757737a beautify Functor for lmder : we now have f,df,debug methods 2009-08-23 04:39:22 +02:00
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
8a27e774f8 use eigen objects for hybrj and lmstr 2009-08-23 03:14:42 +02:00
Thomas Capricelli
3251e12258 use eigen objects for the lmder callback 2009-08-23 03:02:03 +02:00
Thomas Capricelli
2727099906 remove redundant code, fix bounds in those loops that still come from
fortran
2009-08-23 02:32:08 +02:00
Thomas Capricelli
1225704753 we do not need/use the 'void *p' parameter 2009-08-23 01:59:20 +02:00
Thomas Capricelli
93fabbff5e use blueNorm() instead of norm() 2009-08-22 07:05:10 +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
20480a5438 merging ei_lmdif() and lmdif_template() 2009-08-21 04:24:59 +02:00
Thomas Capricelli
2e3d17c3ce be (hopefully) smarter with indices convention : we keep the c convention
(0->n-1) as much as possible, and only convert at borders with
fortran-expecting methods, that will eventually dissapear.
2009-08-21 04:16:37 +02:00
Thomas Capricelli
1715e2cb3b merging ei_lmder and lmder_template into ei_lmder() which takes eigen
argument, but still uses f2c code inside.
2009-08-21 02:34:40 +02:00
Thomas Capricelli
9294d33a11 use references intead of pointers for njev/nfev 2009-08-21 00:23:26 +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
8d2f6ad7e1 iwa is not really an argument, but just an old fashioned 'work array' :
remove it from the eigen API
2009-08-20 22:46:38 +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
6953cad81d remove unneeded "Eigen::", we already 'use' Eigen namespace 2009-08-19 20:06:34 +02:00
Thomas Capricelli
369693aa1c oops, forgot those ones 2009-08-19 20:02:49 +02:00
Thomas Capricelli
3093e92da5 machine_epsilon is now called epsilon in latest eigen 2009-08-19 19:53:08 +02:00
Thomas Capricelli
703198a1a6 wrapper for chkder() : this was the last wrapper missing 2009-08-19 18:32:37 +02:00
Thomas Capricelli
3f63d6f97f fix BoxBOD in the first case : now all tests pass 2009-08-14 19:04:09 +02:00
Thomas Capricelli
3856c2d84d oops, i missed one : real last difficult nist test : Eckerle4 2009-08-14 18:54:28 +02:00
Thomas Capricelli
93627fefcf last 'hard' test from Nist : ratkowsky3 2009-08-14 18:31:04 +02:00
Thomas Capricelli
91f61f7679 fix bad urls 2009-08-14 17:48:04 +02:00
Thomas Capricelli
d8c671f475 yet another (difficult) Nist test : Thurber 2009-08-14 17:46:28 +02:00
Thomas Capricelli
e057d1ef47 tweak precision for Chwirut2 test 2009-08-14 17:25:39 +02:00
Thomas Capricelli
56127cfb1a add yet another easy Nist test : Chwirut2 2009-08-14 17:21:31 +02:00
Thomas Capricelli
f7cd4c8923 cleaning : wa1 used in 'covar' needs not be the same as in lmder* and all.
it's just an old-fashioned way to re-use memory without allocation...
2009-08-13 16:29:17 +02:00
Thomas Capricelli
7b922eb634 BoxBOD : oops.. shame on me, i did a mistake in the derivative.... now we need 16
iterations instead of 7693 ;-)
the first test still fails though.
2009-08-12 02:34:22 +02:00
Thomas Capricelli
fd307b8f3f fix a bug in BoxBOD Nist test : we now get the actual value for 'start 2'
'start 1' still fails though :/
2009-08-12 02:27:44 +02:00
Thomas Capricelli
3c675609bf add another Nist test of 'hard' difficutly : Bennett5 2009-08-12 02:13:04 +02:00
Thomas Capricelli
54d09a8122 add another Nist test of 'hard' difficutly : MGH09 2009-08-12 01:50:56 +02:00
Thomas Capricelli
5ac17b4680 add another Nist test of medium difficutly : MGH17 2009-08-11 20:24:02 +02:00