-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcuba.h
130 lines (111 loc) · 4.8 KB
/
cuba.h
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
119
120
121
122
123
124
125
126
127
128
129
/*
cuba.h
Prototypes for the Cuba library
this file is part of Cuba
last modified 30 Oct 20 th
*/
#ifndef CUBA_H
#define CUBA_H
typedef double cubareal;
/* integrand_t is intentionally a minimalistic integrand type.
It includes neither the nvec and core arguments nor the
extra arguments passed by Vegas/Suave (weight, iter) and
Divonne (phase).
In most cases, integrand_t is just what you want, otherwise
simply use an explicit typecast to integrand_t in the Cuba
invocation. */
typedef int (*integrand_t)(const int *ndim, const cubareal x[],
const int *ncomp, cubareal f[], void *userdata);
typedef void (*peakfinder_t)(const int *ndim, const cubareal b[],
int *n, cubareal x[], void *userdata);
#ifdef __cplusplus
extern "C" {
#endif
void Vegas(const int ndim, const int ncomp,
integrand_t integrand, void *userdata, const int nvec,
const cubareal epsrel, const cubareal epsabs,
const int flags, const int seed,
const int mineval, const int maxeval,
const int nstart, const int nincrease, const int nbatch,
const int gridno, const char *statefile, void *spin,
int *neval, int *fail,
cubareal integral[], cubareal error[], cubareal prob[]);
void llVegas(const int ndim, const int ncomp,
integrand_t integrand, void *userdata, const long long int nvec,
const cubareal epsrel, const cubareal epsabs,
const int flags, const int seed,
const long long int mineval, const long long int maxeval,
const long long int nstart, const long long int nincrease,
const long long int nbatch,
const int gridno, const char *statefile, void *spin,
long long int *neval, int *fail,
cubareal integral[], cubareal error[], cubareal prob[]);
void Suave(const int ndim, const int ncomp,
integrand_t integrand, void *userdata, const int nvec,
const cubareal epsrel, const cubareal epsabs,
const int flags, const int seed,
const int mineval, const int maxeval,
const int nnew, const int nmin,
const cubareal flatness, const char *statefile, void *spin,
int *nregions, int *neval, int *fail,
cubareal integral[], cubareal error[], cubareal prob[]);
void llSuave(const int ndim, const int ncomp,
integrand_t integrand, void *userdata, const long long int nvec,
const cubareal epsrel, const cubareal epsabs,
const int flags, const int seed,
const long long int mineval, const long long int maxeval,
const long long int nnew, const long long int nmin,
const cubareal flatness, const char *statefile, void *spin,
int *nregions, long long int *neval, int *fail,
cubareal integral[], cubareal error[], cubareal prob[]);
void Divonne(const int ndim, const int ncomp,
integrand_t integrand, void *userdata, const int nvec,
const cubareal epsrel, const cubareal epsabs,
const int flags, const int seed,
const int mineval, const int maxeval,
const int key1, const int key2, const int key3, const int maxpass,
const cubareal border, const cubareal maxchisq, const cubareal mindeviation,
const int ngiven, const int ldxgiven, cubareal xgiven[],
const int nextra, peakfinder_t peakfinder,
const char *statefile, void *spin,
int *nregions, int *neval, int *fail,
cubareal integral[], cubareal error[], cubareal prob[]);
void llDivonne(const int ndim, const int ncomp,
integrand_t integrand, void *userdata, const long long int nvec,
const cubareal epsrel, const cubareal epsabs,
const int flags, const int seed,
const long long int mineval, const long long int maxeval,
const int key1, const int key2, const int key3, const int maxpass,
const cubareal border, const cubareal maxchisq, const cubareal mindeviation,
const long long int ngiven, const int ldxgiven, cubareal xgiven[],
const long long int nextra, peakfinder_t peakfinder,
const char *statefile, void *spin,
int *nregions, long long int *neval, int *fail,
cubareal integral[], cubareal error[], cubareal prob[]);
void Cuhre(const int ndim, const int ncomp,
integrand_t integrand, void *userdata, const int nvec,
const cubareal epsrel, const cubareal epsabs,
const int flags, const int mineval, const int maxeval,
const int key,
const char *statefile, void *spin,
int *nregions, int *neval, int *fail,
cubareal integral[], cubareal error[], cubareal prob[]);
void llCuhre(const int ndim, const int ncomp,
integrand_t integrand, void *userdata, const long long int nvec,
const cubareal epsrel, const cubareal epsabs,
const int flags,
const long long int mineval, const long long int maxeval,
const int key,
const char *statefile, void *spin,
int *nregions, long long int *neval, int *fail,
cubareal integral[], cubareal error[], cubareal prob[]);
void cubafork(void *pspin);
void cubawait(void *pspin);
void cubacores(const int *n, const int *p);
void cubaaccel(const int *n, const int *p);
void cubainit(void (*f)(), void *arg);
void cubaexit(void (*f)(), void *arg);
#ifdef __cplusplus
}
#endif
#endif