Debian Codegraph @

contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.h

raw
1 /*
2 * Copyright (C) 1996-2011 Daniel Waggoner and Tao Zha
3 *
4 * This free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * It is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * If you did not received a copy of the GNU General Public License
15 * with this software, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef __MARKOV_SWITCHING_OPTIMIZATION__
19 #define __MARKOV_SWITCHING_OPTIMIZATION__
20
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25
26 #include "dw_switch.h"
27
28
29 void SetupObjectiveFunction(TStateModel *model, PRECISION *Modified, PRECISION *FreeQ, PRECISION *FreeTheta);
30 void SetupObjectiveFunction_AllocateMemory(TStateModel *model, int FreeTheta_Idx, int FreeQ_Idx, int Modified_Idx);
31
32 PRECISION PosteriorObjectiveFunction(PRECISION *x, int n);
33 PRECISION PosteriorObjectiveFunction_csminwel(double *x, int n, double **args, int *dims);
34 void PosteriorObjectiveFunction_npsol(int *mode, int *n, double *x, double *f, double *g, int *nstate);
35
36 PRECISION MLEObjectiveFunction(PRECISION *x, int n);
37 PRECISION MLEObjectiveFunction_csminwel(double *x, int n, double **args, int *dims);
38 void MLEObjectiveFunction_npsol(int *mode, int *n, double *x, double *f, double *g, int *nstate);
39
40 int PosteriorOptimization_csminwel(TStateModel *model, int offset, int length, int flag, int max_iteration,
41 PRECISION tolerance, PRECISION stepsize, PRECISION hessian_scale);
42
43 int Estimate_csminwel(TStateModel *model, int iter_block, int iter_start, PRECISION iter_inc,
44 PRECISION crit_start, PRECISION crit_end, PRECISION crit_inc,
45 PRECISION stepsize_theta, PRECISION hessian_scale_theta,
46 PRECISION stepsize_q, PRECISION hessian_scale_q,
47 PRECISION stepsize_full, PRECISION hessian_scale_full,FILE *f_out);
48
49
50 #ifdef __cplusplus
51 }
52 #endif
53 #endif