Debian Codegraph @

external/gsl/gsl_monte_miser.h

raw
1 /* monte/gsl_monte_miser.h
2 *
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20 /* Author: MJB */
21
22 #ifndef __GSL_MONTE_MISER_H__
23 #define __GSL_MONTE_MISER_H__
24
25 #include "gsl_rng.h"
26 #include "gsl_monte.h"
27 #include "gsl_monte_plain.h"
28
29 #undef __BEGIN_DECLS
30 #undef __END_DECLS
31 #ifdef __cplusplus
32 # define __BEGIN_DECLS extern "C" {
33 # define __END_DECLS }
34 #else
35 # define __BEGIN_DECLS /* empty */
36 # define __END_DECLS /* empty */
37 #endif
38
39 __BEGIN_DECLS
40
41 typedef struct {
42 size_t min_calls;
43 size_t min_calls_per_bisection;
44 double dither;
45 double estimate_frac;
46 double alpha;
47 size_t dim;
48 int estimate_style;
49 int depth;
50 int verbose;
51 double * x;
52 double * xmid;
53 double * sigma_l;
54 double * sigma_r;
55 double * fmax_l;
56 double * fmax_r;
57 double * fmin_l;
58 double * fmin_r;
59 double * fsum_l;
60 double * fsum_r;
61 double * fsum2_l;
62 double * fsum2_r;
63 size_t * hits_l;
64 size_t * hits_r;
65 } gsl_monte_miser_state;
66
67 int gsl_monte_miser_integrate(gsl_monte_function * f,
68 const double xl[], const double xh[],
69 size_t dim, size_t calls,
70 gsl_rng *r,
71 gsl_monte_miser_state* state,
72 double *result, double *abserr);
73
74 gsl_monte_miser_state* gsl_monte_miser_alloc(size_t dim);
75
76 int gsl_monte_miser_init(gsl_monte_miser_state* state);
77
78 void gsl_monte_miser_free(gsl_monte_miser_state* state);
79
80
81 __END_DECLS
82
83 #endif /* __GSL_MONTE_MISER_H__ */