Mercurial > hg > octave-lyh
comparison liboctave/Quad.cc @ 1253:bb67a902760b
[project @ 1995-04-11 16:35:23 by jwe]
author | jwe |
---|---|
date | Tue, 11 Apr 1995 16:35:23 +0000 |
parents | 97eac19837dc |
children | f93b7fa5e113 |
comparison
equal
deleted
inserted
replaced
1252:ccb22498f289 | 1253:bb67a902760b |
---|---|
40 // function, and the user wants us to quit. | 40 // function, and the user wants us to quit. |
41 int quad_integration_error = 0; | 41 int quad_integration_error = 0; |
42 | 42 |
43 extern "C" | 43 extern "C" |
44 { | 44 { |
45 int F77_FCN (dqagp) (const double (*)(double*, int&), | 45 int F77_FCN (dqagp, DQAGP) (const double (*)(double*, int&), |
46 const double&, const double&, const int&, | 46 const double&, const double&, |
47 const double*, const double&, const double&, | 47 const int&, const double*, |
48 double&, double&, int&, int&, const int&, | 48 const double&, const double&, double&, |
49 const int&, int&, int*, double*); | 49 double&, int&, int&, const int&, |
50 | 50 const int&, int&, int*, double*); |
51 int F77_FCN (dqagi) (const double (*)(double*, int&), const double&, | 51 |
52 const int&, const double&, const double&, | 52 int F77_FCN (dqagi, DQAGI) (const double (*)(double*, int&), |
53 double&, double&, int&, int&, const int&, | 53 const double&, const int&, |
54 const int&, int&, int*, double*); | 54 const double&, const double&, double&, |
55 double&, int&, int&, const int&, | |
56 const int&, int&, int*, double*); | |
55 } | 57 } |
56 | 58 |
57 Quad::Quad (integrand_fcn fcn) | 59 Quad::Quad (integrand_fcn fcn) |
58 { | 60 { |
59 f = fcn; | 61 f = fcn; |
173 int last; | 175 int last; |
174 | 176 |
175 double abs_tol = absolute_tolerance (); | 177 double abs_tol = absolute_tolerance (); |
176 double rel_tol = relative_tolerance (); | 178 double rel_tol = relative_tolerance (); |
177 | 179 |
178 F77_FCN (dqagp) (user_function, lower_limit, upper_limit, npts, | 180 F77_FCN (dqagp, DQAGP) (user_function, lower_limit, upper_limit, |
179 points, abs_tol, rel_tol, result, abserr, | 181 npts, points, abs_tol, rel_tol, result, |
180 neval, ier, leniw, lenw, last, iwork, work); | 182 abserr, neval, ier, leniw, lenw, last, |
183 iwork, work); | |
181 | 184 |
182 delete [] iwork; | 185 delete [] iwork; |
183 delete [] work; | 186 delete [] work; |
184 | 187 |
185 return result; | 188 return result; |
241 } | 244 } |
242 | 245 |
243 double abs_tol = absolute_tolerance (); | 246 double abs_tol = absolute_tolerance (); |
244 double rel_tol = relative_tolerance (); | 247 double rel_tol = relative_tolerance (); |
245 | 248 |
246 F77_FCN (dqagi) (user_function, bound, inf, abs_tol, rel_tol, | 249 F77_FCN (dqagi, DQAGI) (user_function, bound, inf, abs_tol, rel_tol, |
247 result, abserr, neval, ier, leniw, lenw, | 250 result, abserr, neval, ier, leniw, lenw, |
248 last, iwork, work); | 251 last, iwork, work); |
249 | 252 |
250 delete [] iwork; | 253 delete [] iwork; |
251 delete [] work; | 254 delete [] work; |
252 | 255 |
253 return result; | 256 return result; |