UltraScan III
Macros | Variables
us_lm.cpp File Reference
#include <QtCore>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include "us_lm.h"
Include dependency graph for us_lm.cpp:

Go to the source code of this file.

Macros

#define LM_MACHEP   DBL_EPSILON /* resolution of arithmetic */
 
#define LM_DWARF   DBL_MIN /* smallest nonzero number */
 
#define LM_SQRT_DWARF   sqrt(DBL_MIN) /* square should not underflow */
 
#define LM_SQRT_GIANT   sqrt(DBL_MAX) /* square should not overflow */
 
#define LM_USERTOL   30*LM_MACHEP /* users are recommended to require this */
 
#define MIN(a, b)   (((a)<=(b)) ? (a) : (b))
 
#define MAX(a, b)   (((a)>=(b)) ? (a) : (b))
 
#define SQR(x)   (x)*(x)
 

Variables

double(* lm_use_norm )(int n, const double *x)
 
const char * lm_infmsg []
 
const char * lm_shortmsg []
 
const US_LM::LM_Control lm_control_double (LM_USERTOL, LM_USERTOL, LM_USERTOL, LM_USERTOL, 100., 100, 1, 0)
 
const US_LM::LM_Control lm_control_float (1.e-7, 1.e-7, 1.e-7, 1.e-7, 100., 100, 0, 0)
 

Macro Definition Documentation

#define LM_DWARF   DBL_MIN /* smallest nonzero number */

Definition at line 47 of file us_lm.cpp.

#define LM_MACHEP   DBL_EPSILON /* resolution of arithmetic */

Definition at line 46 of file us_lm.cpp.

#define LM_SQRT_DWARF   sqrt(DBL_MIN) /* square should not underflow */

Definition at line 48 of file us_lm.cpp.

#define LM_SQRT_GIANT   sqrt(DBL_MAX) /* square should not overflow */

Definition at line 49 of file us_lm.cpp.

#define LM_USERTOL   30*LM_MACHEP /* users are recommended to require this */

Definition at line 50 of file us_lm.cpp.

#define MAX (   a,
 
)    (((a)>=(b)) ? (a) : (b))

Definition at line 285 of file us_lm.cpp.

#define MIN (   a,
 
)    (((a)<=(b)) ? (a) : (b))

Definition at line 284 of file us_lm.cpp.

#define SQR (   x)    (x)*(x)

Definition at line 286 of file us_lm.cpp.

Variable Documentation

const US_LM::LM_Control lm_control_double(LM_USERTOL, LM_USERTOL, LM_USERTOL, LM_USERTOL, 100., 100, 1, 0)
const US_LM::LM_Control lm_control_float(1.e-7, 1.e-7, 1.e-7, 1.e-7, 100., 100, 0, 0)
const char* lm_infmsg[]
Initial value:
= {
"success (sum of squares below underflow limit)",
"success (the relative error in the sum of squares is at most tol)",
"success (the relative error between x and the solution is at most tol)",
"success (both errors are at most tol)",
"trapped by degeneracy (fvec is orthogonal to the columns of the jacobian)",
"timeout (number of calls to fcn has reached maxcall*(n+1))",
"failure (ftol<tol: cannot reduce sum of squares any further)",
"failure (xtol<tol: cannot improve approximate solution any further)",
"failure (gtol<tol: cannot improve approximate solution any further)",
"exception (not enough memory)",
"fatal coding error (improper input parameters)",
"exception (break requested within function evaluation)"
}

Definition at line 73 of file us_lm.cpp.

const char* lm_shortmsg[]
Initial value:
= {
"success (0)",
"success (f)",
"success (p)",
"success (f,p)",
"degenerate",
"call limit",
"failed (f)",
"failed (p)",
"failed (o)",
"no memory",
"invalid input",
"user break"
}

Definition at line 88 of file us_lm.cpp.

double(* lm_use_norm)(int n, const double *x)

Definition at line 67 of file us_lm.cpp.