Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:03:50

0001 /* monte/gsl_monte_plain.h
0002  * 
0003  * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018  */
0019 
0020 /* Plain Monte-Carlo. */
0021 
0022 /* Author: MJB */
0023 
0024 #ifndef __GSL_MONTE_PLAIN_H__
0025 #define __GSL_MONTE_PLAIN_H__
0026 
0027 #include <stdio.h>
0028 #include <gsl/gsl_monte.h>
0029 #include <gsl/gsl_rng.h>
0030 
0031 #undef __BEGIN_DECLS
0032 #undef __END_DECLS
0033 #ifdef __cplusplus
0034 # define __BEGIN_DECLS extern "C" {
0035 # define __END_DECLS }
0036 #else
0037 # define __BEGIN_DECLS /* empty */
0038 # define __END_DECLS /* empty */
0039 #endif
0040 
0041 __BEGIN_DECLS
0042 
0043 typedef struct {
0044   size_t dim;
0045   double *x;
0046 } gsl_monte_plain_state;
0047 
0048 int
0049 gsl_monte_plain_integrate (const gsl_monte_function * f,
0050                            const double xl[], const double xu[],
0051                            const size_t dim,
0052                            const size_t calls, 
0053                            gsl_rng * r,
0054                            gsl_monte_plain_state * state,
0055                            double *result, double *abserr);
0056 
0057 gsl_monte_plain_state* gsl_monte_plain_alloc(size_t dim);
0058 
0059 int gsl_monte_plain_init(gsl_monte_plain_state* state);
0060 
0061 void gsl_monte_plain_free (gsl_monte_plain_state* state);
0062 
0063 __END_DECLS
0064 
0065 #endif /* __GSL_MONTE_PLAIN_H__ */