📄 d6_optim.pas
字号:
{ **********************************************************************
* Unit OPTIM.PAS *
* Version 2.4d *
* (c) J. Debord, February 2003 *
**********************************************************************
This unit implements the following methods for function minimization:
* Golden search for a function of one variable
* Simplex, Marquardt, BFGS for a function of several variables
**********************************************************************
References:
1) 'Numerical Recipes' by Press et al.
2) D. W. MARQUARDT, J. Soc. Indust. Appl. Math., 1963, 11, 431-441
3) J. A. NELDER & R. MEAD, Comput. J., 1964, 7, 308-313
4) R. O'NEILL, Appl. Statist., 1971, 20, 338-345
********************************************************************** }
unit d6_optim;
interface
uses
d6_fmath, d6_matrices;
{ **********************************************************************
Error codes
********************************************************************** }
const
OPT_OK = 0; { No error }
OPT_SING = - 1; { Singular hessian matrix }
OPT_BIG_LAMBDA = - 2; { Too high Marquardt's parameter }
OPT_NON_CONV = - 3; { Non-convergence }
{ **********************************************************************
Functional types
********************************************************************** }
type
{ Procedure to compute gradient vector }
TGradient = procedure(Func : TFuncNVar;
X : TVector;
Lbound, Ubound : Integer;
G : TVector);
//R.R. -- procedure "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -