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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
//
// A rust binding for the GSL library by Guillaume Gomez (guillaume1.gomez@gmail.com)
//
pub mod mode {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
pub enum Mode {
PrecDouble,
PrecSingle,
PrecApprox
}
}
pub mod value {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
pub enum Value {
Success = 0,
Failure = -1,
/// iteration has not converged
Continue = -2,
/// input domain error, e.g sqrt(-1)
Dom = 1,
/// output range error, e.g. exp(1e100)
Range = 2,
/// invalid pointer
Fault = 3,
/// invalid argument supplied by user
Inval = 4,
/// generic failure
Failed = 5,
/// factorization failed
Factor = 6,
/// sanity check failed - shouldn't happen
Sanity = 7,
/// malloc failed
NoMem = 8,
/// problem with user-supplied function
BadFunc = 9,
/// iterative process is out of control
RunAway = 10,
/// exceeded max number of iterations
MaxIter = 11,
/// tried to divide by zero
ZeroDiv = 12,
/// user specified an invalid tolerance
BadTol = 13,
/// failed to reach the specified tolerance
Tol = 14,
/// underflow
UndrFlw = 15,
/// overflow
OvrFlw = 16,
/// loss of accuracy
Loss = 17,
/// failed because of roundoff error
Round = 18,
/// matrix, vector lengths are not conformant
BadLen = 19,
/// matrix not square
NotSqr = 20,
/// apparent singularity detected
Sing = 21,
/// integral or series is divergent
Diverge = 22,
/// requested feature is not supported by the hardware
Unsup = 23,
/// requested feature not (yet) implemented
Unimpl = 24,
/// cache limit exceeded
Cache = 25,
/// table limit exceeded
Table = 26,
/// iteration is not making progress towards solution
NoProg = 27,
/// jacobian evaluations are not improving the solution
NoProgJ = 28,
/// cannot reach the specified tolerance in F
TolF = 29,
/// cannot reach the specified tolerance in X
TolX = 30,
/// cannot reach the specified tolerance in gradient
TolG = 31,
/// cannot reach the specified tolerance in gradient
EOF = 32
}
}
pub mod eigen_sort {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
pub enum EigenSort {
/// ascending order in numerical value
ValAsc,
/// descending order in numerical value
VasDesc,
/// ascending order in magnitude
AbsAsc,
/// descending order in magnitude
AbsDesc
}
}
pub mod fft_direction {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
/// this gives the sign in the formula
///
/// h(f) = \sum x(t) exp(+/- 2 pi i f t)
///
/// where - is the forward transform direction and + the inverse direction
pub enum FftDirection {
Forward = -1,
Backward = 1
}
}
pub mod gauss_konrod_rule {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
/// The low-level integration rules in QUADPACK are identified by small integers (1-6). We'll use symbolic constants to refer to them.
pub enum GaussKonrodRule {
/// 15 point Gauss-Kronrod rule
Gauss15 = 1,
/// 21 point Gauss-Kronrod rule
Gauss21 = 2,
/// 31 point Gauss-Kronrod rule
Gauss31 = 3,
/// 41 point Gauss-Kronrod rule
Gauss41 = 4,
/// 51 point Gauss-Kronrod rule
Gauss51 = 5,
/// 61 point Gauss-Kronrod rule
Gauss61 = 6,
}
}
pub mod integration_qawo {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
/// Used by workspace for QAWO integrator
pub enum IntegrationQawo {
Cosine,
Sine
}
}
pub mod vegas_mode {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
/// Used by VegasMonteCarlo struct
pub enum VegasMode {
Importance = 1,
ImportanceOnly = 0,
Stratified = -1
}
}
pub mod odeiv {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
/// Possible return values for an hadjust() evolution method for ordinary differential equations
pub enum ODEiv {
/// step was increased
Inc = 1,
/// step unchanged
Nil = 0,
/// step decreased
Dec = -1
}
}
pub mod wavelet_direction {
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
#[repr(C)]
pub enum WaveletDirection {
Forward = 1,
Backward = -1
}
}