Thomas Capricelli
f793dbe45c
only indentation fixes (this eases porting)
2009-08-23 21:06:57 +02:00
Thomas Capricelli
feb5af3ede
porting lmpar() to eigen : both api and some of the code
2009-08-23 21:04:55 +02:00
Thomas Capricelli
9a8c5cbd2c
misc cleaning
2009-08-23 06:16:05 +02:00
Thomas Capricelli
264e61932c
cleaning fdjac*()
2009-08-23 06:04:06 +02:00
Thomas Capricelli
f01332043b
only indentation
2009-08-23 05:56:12 +02:00
Thomas Capricelli
8b9b671e83
some eigenization in main algorithms
2009-08-23 05:55:43 +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
f2fcbb0207
use eigen objects for ei_fdjac*(), this is a prerequisite before porting
...
hybrd/lmdif..
2009-08-23 03:54:40 +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
1225704753
we do not need/use the 'void *p' parameter
2009-08-23 01:59:20 +02:00
Thomas Capricelli
a3e8a14e3a
forgot to clean this one
2009-08-22 07:40:43 +02:00
Thomas Capricelli
c5218c7d38
ei_lmpar : use a reference for the parameter
2009-08-22 07:37:23 +02:00
Thomas Capricelli
b3f8d02df4
use const for machine constants
2009-08-22 07:31:14 +02:00
Thomas Capricelli
bb6ffafdb9
keep on cleaning f2c mess
2009-08-22 07:27:17 +02:00
Thomas Capricelli
a35586504e
cleaning f2c mess / trivial stuff
2009-08-22 07:14:17 +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
783f355904
cleaning defines from f2c (use std::min and such instead of own ones)
2009-08-22 05:32:17 +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
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
524e112ee5
merging ei_lmstr() and lmstr_template()
2009-08-21 03:41:19 +02:00
Thomas Capricelli
e48b6ad905
merging ei_hybrj() and hybrj_template()
2009-08-21 03:26:28 +02:00
Thomas Capricelli
f2ff0d3903
merging ei_hybrd() and hybrd_template()
2009-08-21 03:13:42 +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
6a8b52b3aa
simplifying
2009-08-21 01:24:04 +02:00
Thomas Capricelli
0abb148b7d
use ei_sqrt instead of sqrt
2009-08-21 00:27:11 +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
9294d33a11
use references intead of pointers for njev/nfev
2009-08-21 00:23:26 +02:00
Thomas Capricelli
054652b789
use math function adapted to the Scalar type instead of hardcoding float or
...
double
2009-08-21 00:04:41 +02:00
Thomas Capricelli
d05af200a5
some more trivial fixes to f2c generated code
2009-08-20 23:56:13 +02:00
Thomas Capricelli
9e71c2827a
nothing more than indentation fixes (using vim '=' command)
2009-08-20 23:36:03 +02:00
Thomas Capricelli
b1e0662785
cleaning f2c mess
2009-08-20 23:33:45 +02:00
Thomas Capricelli
275a658ec5
porting chkder to eigen
2009-08-20 23:26:40 +02:00
Thomas Capricelli
2e3fa34b9f
cleaning a little bit the f2c mess for chkder
2009-08-20 23:07:16 +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
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
a84dc9a5c1
coherency for scalar typename : use "Scalar" everywhere
2009-08-20 21:10:28 +02:00
Thomas Capricelli
df98e66019
oops fix hardcoded typename, which is actually provided as template
...
parameter
2009-08-20 21:06:26 +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
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
3093e92da5
machine_epsilon is now called epsilon in latest eigen
2009-08-19 19:53:08 +02:00