Mir 1.0
Mir application programming interface

Context for least squares procedures. More...

#include <mirml_lsq.h>

Data Fields

int dataMode
 Type of mode for collecting data.
 
int weightMode
 Type of weighting of residuals.
 
int minMethod
 Method for minimizing LS functional.
 
int linMethod
 Method for solving sets of linear equations.
 
unsigned int nParams
 Number of parameters to be refined.
 
unsigned int nData
 Number of terms in LS functional (number of experimental points)
 
unsigned int status
 Current status of LS problem.
 
double atol
 Tolerance for additions.
 
double gtol
 Tolerance for gradient.
 
mirml_nr_svd_tsvd
 Structure for SVD.
 
int maxTrsIter
 Maximal number of iterations in TRS procedure.
 
double lambdaLM
 Current value of the stabilizing parameter Lambda in LM-method.
 
double lmFactorUp
 Factor for increasing Lambda.
 
double lmFactorDown
 Factor for decreasing Lambda.
 
mirml_matrix_tJ
 Jacobian matrix [nData-by-nParams].
 
mirml_matrix_talpha
 Design matrix [nParams-by-nParams] or covariance matrix afrer mirml_lsq_covar.
 
mirml_vector_tbeta
 Beta vector [nParams].
 
mirml_vector_ta
 Current parameter values [nParams].
 
mirml_vector_tda
 Last parameter increments [nParams].
 
mirml_vector_tf
 Residuals [nData].
 
mirml_vector_twV
 Vector of weights [nData].
 
mirml_matrix_twM
 Matrix of weights [nData-by-nData].
 
mirml_vector_tcreL
 Ellipsoid of confidence region: lengths of axes.
 
mirml_matrix_tcreV
 Ellipsoid of confidence region: directions of axes.
 
double chisq0
 Initial value of LS functional.
 
double chisq
 Current minimal value of LS functional.
 
double chisqTrs
 Current LS functional value in TRS procedure.
 
double daMax
 Scaled maximal absolute addition.
 
double daRms
 RMS of scaled additions.
 
double grMax
 Scaled maximal absolute gradient component.
 
double grRms
 RMS of scaled gradient.
 
double rho
 Relative change in functional.
 
int alpha_nullity
 Number of linear dependencies in the problem.
 
double condition_inv
 Inverted condition of the problem.
 
int curTrsIter
 Number of iterations done in TRS procedure.
 
void * usrd
 Pointer to user-defined data.
 
mirkl_error_t *(* fdf_complete )(const mirml_vector_t *a, mirml_vector_t *f, mirml_matrix_t *J, void *usrd)
 Callback function for evaluation of LS residuals and Jacobian in COMPLETE mode. More...
 
mirkl_error_t *(* update_func )(const mirml_vector_t *a, const mirml_vector_t *da, void *usrd)
 Callback function for updating parameters. More...
 
mirkl_error_t *(* infctl_func )(int tag, int curIter, void *usrd, struct mirml_lsq_t_ *lsq)
 Callback function for getting information and interaction with LSQ procedures. More...
 

Detailed Description

Context for least squares procedures.

Field Documentation

◆ fdf_complete

mirkl_error_t *(* mirml_lsq_t_::fdf_complete) (const mirml_vector_t *a, mirml_vector_t *f, mirml_matrix_t *J, void *usrd)

Callback function for evaluation of LS residuals and Jacobian in COMPLETE mode.

a - input vector with current set of values for refined parameters. f - if not NULL values for residuals (y_exp - y_model) for the complete range of data [nData] must be calculated. J - if not NULL full Jacobian [nData-by-nParams] dy_i/dp_j must be calculated. usrd - pointer to data possibly defined by user.

◆ infctl_func

mirkl_error_t *(* mirml_lsq_t_::infctl_func) (int tag, int curIter, void *usrd, struct mirml_lsq_t_ *lsq)

Callback function for getting information and interaction with LSQ procedures.

tag - Special tag from LSQ_TAG_... indication the place where the callback is called from. curIter - current iteration number, if applicable. usrd - pointer to data possibly defined by user. lsq - LSQ context.

◆ update_func

mirkl_error_t *(* mirml_lsq_t_::update_func) (const mirml_vector_t *a, const mirml_vector_t *da, void *usrd)

Callback function for updating parameters.

a - input vector [nParams] with current set of values for refined parameters. da - input vector [nParams] with additions for refined parameters. usrd - pointer to data possibly defined by user.


The documentation for this struct was generated from the following file: