2 * Library: lmfit (Levenberg-Marquardt least squares fitting)
6 * Contents: Declarations of parameter records, used in lmmin.h and lmcurve.h
8 * Copyright: Joachim Wuttke, Forschungszentrum Juelich GmbH (2004-2013)
10 * License: see ../COPYING (FreeBSD)
12 * Homepage: apps.jcns.fz-juelich.de/lmfit
20 # define __BEGIN_DECLS extern "C" {
21 # define __END_DECLS }
23 # define __BEGIN_DECLS /* empty */
24 # define __END_DECLS /* empty */
30 /* Collection of input parameters for fit control. */
32 double ftol; /* Relative error desired in the sum of squares.
33 Termination occurs when both the actual and
34 predicted relative reductions in the sum of squares
36 double xtol; /* Relative error between last two approximations.
37 Termination occurs when the relative error between
38 two consecutive iterates is at most xtol. */
39 double gtol; /* Orthogonality desired between fvec and its derivs.
40 Termination occurs when the cosine of the angle
41 between fvec and any column of the Jacobian is at
42 most gtol in absolute value. */
43 double epsilon; /* Step used to calculate the Jacobian, should be
44 slightly larger than the relative error in the
45 user-supplied functions. */
46 double stepbound; /* Used in determining the initial step bound. This
47 bound is set to the product of stepbound and the
48 Euclidean norm of diag*x if nonzero, or else to
49 stepbound itself. In most cases stepbound should lie
50 in the interval (0.1,100.0). Generally, the value
51 100.0 is recommended. */
52 int patience; /* Used to set the maximum number of function evaluations
53 to patience*(number_of_parameters+1). */
54 int scale_diag; /* If 1, the variables will be rescaled internally.
55 Recommended value is 1. */
56 FILE* msgfile; /* Progress messages will be written to this file. */
57 int verbosity; /* OR'ed: 1: print some messages; 2: print Jacobian. */
58 int n_maxpri; /* -1, or max number of parameters to print. */
59 int m_maxpri; /* -1, or max number of residuals to print. */
62 /* Collection of output parameters for status info. */
64 double fnorm; /* norm of the residue vector fvec. */
65 int nfev; /* actual number of iterations. */
66 int outcome; /* Status indicator. Nonnegative values are used as index
67 for the message text lm_infmsg, set in lmmin.c. */
68 int userbreak; /* Set when function evaluation requests termination. */
71 /* Preset (and recommended) control parameter settings. */
72 extern const lm_control_struct lm_control_double;
73 extern const lm_control_struct lm_control_float;
75 /* Preset message texts. */
77 extern const char *lm_infmsg[];
78 extern const char *lm_shortmsg[];
81 #endif /* LMSTRUCT_H */