gsl_monte_miser.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. /* Author: MJB */
  20. #ifndef __GSL_MONTE_MISER_H__
  21. #define __GSL_MONTE_MISER_H__
  22. #include "gsl_rng.h"
  23. #include "gsl_monte.h"
  24. #include "gsl_monte_plain.h"
  25. #undef __BEGIN_DECLS
  26. #undef __END_DECLS
  27. #ifdef __cplusplus
  28. # define __BEGIN_DECLS extern "C" {
  29. # define __END_DECLS }
  30. #else
  31. # define __BEGIN_DECLS /* empty */
  32. # define __END_DECLS /* empty */
  33. #endif
  34. __BEGIN_DECLS
  35. typedef struct {
  36. size_t min_calls;
  37. size_t min_calls_per_bisection;
  38. double dither;
  39. double estimate_frac;
  40. double alpha;
  41. size_t dim;
  42. int estimate_style;
  43. int depth;
  44. int verbose;
  45. double * x;
  46. double * xmid;
  47. double * sigma_l;
  48. double * sigma_r;
  49. double * fmax_l;
  50. double * fmax_r;
  51. double * fmin_l;
  52. double * fmin_r;
  53. double * fsum_l;
  54. double * fsum_r;
  55. double * fsum2_l;
  56. double * fsum2_r;
  57. size_t * hits_l;
  58. size_t * hits_r;
  59. } gsl_monte_miser_state;
  60. int gsl_monte_miser_integrate(gsl_monte_function * f,
  61. const double xl[], const double xh[],
  62. size_t dim, size_t calls,
  63. gsl_rng *r,
  64. gsl_monte_miser_state* state,
  65. double *result, double *abserr);
  66. gsl_monte_miser_state* gsl_monte_miser_alloc(size_t dim);
  67. int gsl_monte_miser_init(gsl_monte_miser_state* state);
  68. void gsl_monte_miser_free(gsl_monte_miser_state* state);
  69. __END_DECLS
  70. #endif /* __GSL_MONTE_MISER_H__ */