mir.optim.least_squares

Nonlinear Least Squares Solver

Members

Aliases

LeastSquaresFunction
alias LeastSquaresFunction(T) = void delegate(Slice!(const(T)*) x, Slice!(T*) y) @(safe) nothrow @(nogc) pure

Delegates for low level D API.

LeastSquaresFunctionBetterC
alias LeastSquaresFunctionBetterC(T) = void function(scope void* context, size_t m, size_t n, const(T)* x, T* y) @(system) nothrow @(nogc) pure

Delegates for low level C API.

LeastSquaresJacobian
alias LeastSquaresJacobian(T) = void delegate(Slice!(const(T)*) x, Slice!(T*, 2) J) @(safe) nothrow @(nogc) pure

Delegates for low level D API.

LeastSquaresJacobianBetterC
alias LeastSquaresJacobianBetterC(T) = void function(scope void* context, size_t m, size_t n, const(T)* x, T* J) @(system) nothrow @(nogc) pure
LeastSquaresTask
alias LeastSquaresTask = void delegate(uint totalThreads, uint threadId, uint i) @(safe) nothrow @(nogc) pure
LeastSquaresTaskBetterC
alias LeastSquaresTaskBetterC = void function(scope const LeastSquaresTask, uint totalThreads, uint threadId, uint i) @(safe) nothrow @(nogc) pure
LeastSquaresThreadManager
alias LeastSquaresThreadManager = void delegate(uint count, scope LeastSquaresTask task) @(safe) nothrow @(nogc) pure

Thread manager delegate type for low level extern(D) API.

LeastSquaresThreadManagerBetterC
alias LeastSquaresThreadManagerBetterC = void function(scope void* context, uint count, scope const LeastSquaresTask taskContext, scope LeastSquaresTaskBetterC task) @(system) nothrow @(nogc) pure

Thread manager function type for low level extern(C) API.

mir_least_squares_init
alias mir_least_squares_init(T : double) = mir_least_squares_init_d
alias mir_least_squares_init(T : float) = mir_least_squares_init_s

Initialize LM data structure with default params for iteration.

mir_least_squares_reset
alias mir_least_squares_reset(T : float) = mir_least_squares_reset_s
alias mir_least_squares_reset(T : double) = mir_least_squares_reset_d

Resets all counters and flags, fills x, y, upper, lower, vecors with default values.

mir_optimize_least_squares
alias mir_optimize_least_squares(T : double) = mir_optimize_least_squares_d
alias mir_optimize_least_squares(T : float) = mir_optimize_least_squares_s

Low level extern(C) wrapper instatiation.

optimizeLeastSquares
alias optimizeLeastSquares(T : double) = optimizeLeastSquaresD
alias optimizeLeastSquares(T : float) = optimizeLeastSquaresS

Low level extern(D) instatiation.

Enums

LeastSquaresStatus
enum LeastSquaresStatus

Functions

leastSquaresStatusString
string leastSquaresStatusString(LeastSquaresStatus st)

Status string for low (extern) and middle (nothrow) levels D API.

mir_least_squares_init_d
void mir_least_squares_init_d(LeastSquaresSettings!double settings)
mir_least_squares_init_s
void mir_least_squares_init_s(LeastSquaresSettings!float settings)

Initialize LM data structure with default params for iteration.

mir_least_squares_iwork_length
size_t mir_least_squares_iwork_length(size_t m, size_t n)
mir_least_squares_reset_d
void mir_least_squares_reset_d(LeastSquaresSettings!double settings)
mir_least_squares_reset_s
void mir_least_squares_reset_s(LeastSquaresSettings!float settings)

Resets all counters and flags, fills x, y, upper, lower, vecors with default values.

mir_least_squares_status_string
immutable(char)* mir_least_squares_status_string(LeastSquaresStatus st)

Status string for extern(C) API.

mir_least_squares_work_length
size_t mir_least_squares_work_length(size_t m, size_t n)
mir_optimize_least_squares_d
LeastSquaresResult!double mir_optimize_least_squares_d(LeastSquaresSettings!double settings, size_t m, size_t n, double* x, const(double)* l, const(double)* u, Slice!(double*) work, Slice!(lapackint*) iwork, void* fContext, LeastSquaresFunctionBetterC!double f, void* gContext, LeastSquaresJacobianBetterC!double g, void* tmContext, LeastSquaresThreadManagerBetterC tm)
mir_optimize_least_squares_s
LeastSquaresResult!float mir_optimize_least_squares_s(LeastSquaresSettings!float settings, size_t m, size_t n, float* x, const(float)* l, const(float)* u, Slice!(float*) work, Slice!(lapackint*) iwork, void* fContext, LeastSquaresFunctionBetterC!float f, void* gContext, LeastSquaresJacobianBetterC!float g, void* tmContext, LeastSquaresThreadManagerBetterC tm)

Low level extern(C) wrapper instatiation.

optimize
LeastSquaresResult!T optimize(LeastSquaresSettings!T settings, size_t m, Slice!(T*) x, Slice!(const(T)*) l, Slice!(const(T)*) u)
LeastSquaresResult!T optimize(LeastSquaresSettings!T settings, size_t m, Slice!(T*) x, Slice!(const(T)*) l, Slice!(const(T)*) u, TaskPool taskPool)

High level D API for Levenberg-Marquardt Algorithm.

optimizeLeastSquares
LeastSquaresResult!T optimizeLeastSquares(LeastSquaresSettings!T settings, size_t m, Slice!(T*) x, Slice!(const(T)*) l, Slice!(const(T)*) u)

High level nothtow D API for Levenberg-Marquardt Algorithm.

optimizeLeastSquaresD
LeastSquaresResult!double optimizeLeastSquaresD(LeastSquaresSettings!double settings, size_t m, Slice!(double*) x, Slice!(const(double)*) l, Slice!(const(double)*) u, Slice!(double*) work, Slice!(lapackint*) iwork, LeastSquaresFunction!double f, LeastSquaresJacobian!double g, LeastSquaresThreadManager tm)
optimizeLeastSquaresS
LeastSquaresResult!float optimizeLeastSquaresS(LeastSquaresSettings!float settings, size_t m, Slice!(float*) x, Slice!(const(float)*) l, Slice!(const(float)*) u, Slice!(float*) work, Slice!(lapackint*) iwork, LeastSquaresFunction!float f, LeastSquaresJacobian!float g, LeastSquaresThreadManager tm)

Low level extern(D) instatiation.

Structs

LeastSquaresResult
struct LeastSquaresResult(T)

Least-Squares results.

LeastSquaresSettings
struct LeastSquaresSettings(T)

Least-Squares iteration settings.

Meta

Authors

Ilya Yaroshenko