optimizeImpl

High level nothtow D API for Levenberg-Marquardt Algorithm.

Computes the argmin over x of sum_i(f(x_i)^2) using the Modified Levenberg-Marquardt algorithm, and an estimate of the Jacobian of f at x.

The function f should take an input vector of length n, and fill an output vector of length m.

The function g is the Jacobian of f, and should fill a row-major m x n matrix.

optimizeImpl
(
alias g = null
alias tm = null
T
)
(
scope ref LeastSquaresLM!T lm
)

Parameters

f

n -> m function

g

m × n Jacobian (optional)

tm

thread manager for finite difference jacobian approximation in case of g is null (optional)

lm
Type: LeastSquaresLM!T

Levenberg-Marquardt data structure

Return Value

Type: LMStatus

optimization status.

See Also

Meta