/usr/include/gretl/gretl_bfgs.h is in libgretl1-dev 2016d-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | /*
* gretl -- Gnu Regression, Econometrics and Time-series Library
* Copyright (C) 2001 Allin Cottrell and Riccardo "Jack" Lucchetti
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GRETL_BFGS_H
#define GRETL_BFGS_H
typedef enum {
BHHH_MAX,
BFGS_MAX,
LBFGS_MAX,
SIMANN_MAX,
NM_MAX
} MaxMethod;
typedef double (*BFGS_CRIT_FUNC) (const double *, void *);
typedef int (*BFGS_GRAD_FUNC) (double *, double *, int,
BFGS_CRIT_FUNC, void *);
typedef double (*BFGS_COMBO_FUNC) (double *, double *, int, void *);
typedef const double *(*BFGS_LLT_FUNC) (const double *, int, void *);
typedef int (*HESS_FUNC) (double *, gretl_matrix *, void *);
int BFGS_max (double *b, int n, int maxit, double reltol,
int *fncount, int *grcount, BFGS_CRIT_FUNC cfunc,
int crittype, BFGS_GRAD_FUNC gradfunc, void *data,
const gretl_matrix *A0, gretlopt opt, PRN *prn);
int LBFGS_max (double *b, int n, int maxit, double reltol,
int *fncount, int *grcount, BFGS_CRIT_FUNC cfunc,
int crittype, BFGS_GRAD_FUNC gradfunc,
BFGS_COMBO_FUNC combo_func, void *data,
const gretl_matrix *bounds, gretlopt opt, PRN *prn);
int newton_raphson_max (double *b, int n, int maxit,
double crittol, double gradtol,
int *itercount, int crittype,
BFGS_CRIT_FUNC cfunc,
BFGS_GRAD_FUNC gradfunc,
HESS_FUNC hessfunc,
void *data, gretlopt opt, PRN *prn);
int BFGS_numeric_gradient (double *b, double *g, int n,
BFGS_CRIT_FUNC func, void *data);
gretl_matrix *numerical_score_matrix (double *b, int T, int k,
BFGS_LLT_FUNC lltfun,
void *data, int *err);
int hessian_from_score (double *b, gretl_matrix *H,
BFGS_GRAD_FUNC gradfunc,
BFGS_CRIT_FUNC cfunc,
void *data);
gretl_matrix *hessian_inverse_from_score (double *b, int n,
BFGS_GRAD_FUNC gradfunc,
BFGS_CRIT_FUNC cfunc,
void *data, int *err);
gretl_matrix *numerical_hessian_inverse (const double *b, int n,
BFGS_CRIT_FUNC func,
void *data, int *err);
double user_BFGS (gretl_matrix *b,
const char *fncall,
const char *gradcall,
DATASET *dset,
const gretl_matrix *bounds,
int minimize, PRN *prn,
int *err);
double user_NR (gretl_matrix *b,
const char *fncall,
const char *gradcall,
const char *hesscall,
DATASET *dset,
int minimize, PRN *prn,
int *err);
double deriv_free_optimize (MaxMethod method,
gretl_matrix *b,
const char *fncall,
int maxit,
int minimize,
DATASET *dset,
PRN *prn,
int *err);
gretl_matrix *fdjac (gretl_matrix *theta, const char *fncall,
DATASET *dset, int *err);
int gretl_simann (double *theta, int n, int maxit,
BFGS_CRIT_FUNC cfunc, void *data,
gretlopt opt, PRN *prn);
int gretl_amoeba (double *theta, int n, int maxit,
BFGS_CRIT_FUNC cfunc, void *data,
gretlopt opt, PRN *prn);
void BFGS_defaults (int *maxit, double *tol, int ci);
int optimizer_get_matrix_name (const char *fncall, char *name);
#endif /* GRETL_BFGS_H */
|