README.txt 3.98 KB
Newer Older
Emmanuel Bertin's avatar
Emmanuel Bertin committed
1
2
    **************************************************************
                                LEVMAR
3
                              version 2.5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
4
5
6
7
8
9
10
11
12
13
14
                          By Manolis Lourakis

                     Institute of Computer Science
            Foundation for Research and Technology - Hellas
                       Heraklion, Crete, Greece
    **************************************************************


GENERAL
This is levmar, a copylefted C/C++ implementation of the Levenberg-Marquardt non-linear
least squares algorithm. levmar includes double and single precision LM versions, both
15
16
17
18
with analytic and finite difference approximated Jacobians. levmar also has some support
for constrained non-linear least squares, allowing linear equation, box and linear
inequality constraints. The following options regarding the solution of the underlying
augmented normal equations are offered:
Emmanuel Bertin's avatar
Emmanuel Bertin committed
19
20
21
22

1) Assuming that you have LAPACK (or an equivalent vendor library such as ESSL, MKL,
   NAG, ...) installed, you can use the included LAPACK-based solvers (default).

23
2) If you don't have LAPACK or decide not to use it, undefine HAVE_LAPACK in levmar.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
24
25
26
27
28
29
30
   and a LAPACK-free, LU-based linear systems solver will by used. Also, the line
   setting the variable LAPACKLIBS in the Makefile should be commented out.

It is strongly recommended that you *do* employ LAPACK; if you don't have it already,
I suggest getting clapack from http://www.netlib.org/clapack. However, LAPACK's
use is not mandatory and the 2nd option makes levmar totally self-contained.
See lmdemo.c for examples of use and http://www.ics.forth.gr/~lourakis/levmar
31
for general comments. An example of using levmar for data fitting is in expfit.c
Emmanuel Bertin's avatar
Emmanuel Bertin committed
32
33
34
35
36
37
38
39
40

The mathematical theory behind levmar is described in the lecture notes entitled
"Methods for Non-Linear Least Squares Problems", by K. Madsen, H.B. Nielsen and O. Tingleff,
Technical University of Denmark (http://www.imm.dtu.dk/courses/02611/nllsq.pdf). 

LICENSE
levmar is released under the GNU Public License (GPL), which can be found in the included
LICENSE file. Note that under the terms of GPL, commercial use is allowed only if a software
employing levmar is also published in source under the GPL. However, if you are interested
41
in using levmar in a proprietary commercial application, a commercial license for levmar
Emmanuel Bertin's avatar
Emmanuel Bertin committed
42
43
44
45
can be obtained by contacting the author using the email address at the end of this file.

COMPILATION
 - You might first consider setting a few configuration options at the top of
46
   levmar.h. See the accompanying comments for more details.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
47
48
49
50
51
52
53
54

 - On a Linux/Unix system, typing "make" will build both levmar and the demo
   program using gcc. Alternatively, if Intel's C++ compiler is installed, it
   can be used by typing "make -f Makefile.icc".

 - Under Windows and if Visual C is installed & configured for command line
   use, type "nmake /f Makefile.vc" in a cmd window to build levmar and the
   demo program. In case of trouble, read the comments on top of Makefile.vc
55
56
57
58
   Visual C++ project files (levmar.vcproj and lmdemo.vcproj) are also included,
   however they are not supported and are only meant to serve as a starting point
   for creating your own. Check http://www.arstdesign.com/articles/prjconverter.html
   if you need to convert to .dsw/.dsp (i.e., Visual C++ 6.0) project files.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
59
60
61
62
63
64
65

 - levmar can also be built under various platforms using the CMake cross-platform
   build system. The included CMakeLists.txt file can be used to generate makefiles
   for Unix systems or project files for Windows systems. See http://www.cmake.org
   for details.

MATLAB INTERFACE
66
Since version 2.2, the levmar distribution includes a matlab interface.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
67
68
69
70
71
72
73
74
See the 'matlab' subdirectory for more information and examples of use.

Notice that *_core.c files are not to be compiled directly; For example,
Axb_core.c is included by Axb.c, to provide single and double precision
routine versions.


Send your comments/bug reports to lourakis at ics forth gr