Skip to main content

Module lmdif

Module lmdif 

Source
Expand description

MINPACK routines backing the Levenberg-Marquardt method.

Port of ql/math/optimization/lmdif.{hpp,cpp}, itself the C translation of the MINPACK Fortran (Argonne National Laboratory, Garbow, Hillstrom, More, 1980). Matrices are stored column-major in flat slices, as in the original; the arithmetic constants MACHEP and DWARF keep MINPACK’s values so results match QuantLib’s.

Traits§

LmdifCostFunction
The user-supplied functions minimized by lmdif.

Functions§

enorm
Computes the Euclidean norm of x.
fdjac2
Computes a forward-difference approximation to the m by n Jacobian at x into the column-major fjac.
lmdif
Minimizes the sum of the squares of m nonlinear functions in n variables by the Levenberg-Marquardt algorithm, approximating the Jacobian by forward differences unless fcn supplies it.
lmpar
Determines the Levenberg-Marquardt parameter par and the corresponding step x such that, with dxnorm = ||D*x||, either par is zero and dxnorm - delta <= 0.1 * delta, or par is positive and |dxnorm - delta| <= 0.1 * delta.
qrfac
Computes the QR factorization A * P = Q * R of the column-major m by n matrix a by Householder transformations with optional column pivoting.
qrsolv
Solves the least-squares system A*x = b, D*x = 0 given the QR factorization of A * P = Q * R.