26#if defined (HAVE_CONFIG_H)
78user_function (
const double&
x,
int&,
double& result)
80 result = (*user_fcn) (
x);
86float_user_function (
const float&
x,
int&,
float& result)
88 result = (*float_user_fcn) (
x);
97 F77_INT npts = octave::to_f77_int (m_singularities.
numel () + 2);
98 double *points = m_singularities.
rwdata ();
101 F77_INT leniw = 183*npts - 122;
107 double *pwork = work.
rwdata ();
112 double abs_tol = absolute_tolerance ();
113 double rel_tol = relative_tolerance ();
123 F77_XFCN (
dqagp, DQAGP, (user_function, m_lower_limit, m_upper_limit,
124 npts, points, abs_tol, rel_tol, result,
125 abserr, xneval, xier, leniw, lenw, last,
137 (*current_liboctave_error_handler) (
"incorrect integration function called");
152 double *pwork = work.
rwdata ();
177 double abs_tol = absolute_tolerance ();
178 double rel_tol = relative_tolerance ();
188 F77_XFCN (
dqagi, DQAGI, (user_function, m_bound, inf, abs_tol, rel_tol,
189 result, abserr, xneval, xier, leniw, lenw,
190 last, piwork, pwork));
201 (*current_liboctave_error_handler) (
"incorrect integration function called");
207 (*current_liboctave_error_handler) (
"incorrect integration function called");
214 F77_INT npts = octave::to_f77_int (m_singularities.
numel () + 2);
215 float *points = m_singularities.
rwdata ();
218 F77_INT leniw = 183*npts - 122;
224 float *pwork = work.
rwdata ();
226 float_user_fcn =
m_ff;
229 float abs_tol = single_precision_absolute_tolerance ();
230 float rel_tol = single_precision_relative_tolerance ();
240 F77_XFCN (
qagp, QAGP, (float_user_function, m_lower_limit, m_upper_limit,
241 npts, points, abs_tol, rel_tol, result,
242 abserr, xneval, xier, leniw, lenw, last,
254 (*current_liboctave_error_handler) (
"incorrect integration function called");
269 float *pwork = work.
rwdata ();
271 float_user_fcn =
m_ff;
294 float abs_tol = single_precision_absolute_tolerance ();
295 float rel_tol = single_precision_relative_tolerance ();
305 F77_XFCN (
qagi, QAGI, (float_user_function, m_bound, inf, abs_tol, rel_tol,
306 result, abserr, xneval, xier, leniw, lenw,
307 last, piwork, pwork));
F77_INT(* quad_float_fcn_ptr)(const float &, int &, float &)
F77_RET_T F77_FUNC(dqagp, DQAGP)(quad_fcn_ptr
F77_INT(* quad_fcn_ptr)(const double &, int &, double &)
double(* integrand_fcn)(double x)
float(* float_integrand_fcn)(float x)
N Dimensional Array with copy-on-write semantics.
T * rwdata()
Size of the specified dimension.
octave_idx_type numel() const
Number of elements in the array.
double do_integrate(octave_idx_type &ier, octave_idx_type &neval, double &abserr)
OCTAVE_NORETURN double do_integrate(octave_idx_type &ier, octave_idx_type &neval, double &abserr)
OCTAVE_NORETURN double do_integrate(octave_idx_type &ier, octave_idx_type &neval, double &abserr)
double do_integrate(octave_idx_type &ier, octave_idx_type &neval, double &abserr)
Vector representing the dimensions (size) of an Array.
subroutine dqagi(f, bound, inf, epsabs, epsrel, result, abserr, neval, ier, limit, lenw, last, iwork, work)
subroutine dqagp(f, a, b, npts2, points, epsabs, epsrel, result, abserr, neval, ier, leniw, lenw, last, iwork, work)
#define F77_XFCN(f, F, args)
octave_f77_int_type F77_INT
F77_RET_T(F77_CONST_CHAR_ARG_DECL, F77_CONST_CHAR_ARG_DECL, F77_CONST_CHAR_ARG_DECL, const F77_INT &, const F77_INT &, const F77_INT &, F77_INT &, F77_INT &, F77_DBLE *, const F77_INT &, F77_DBLE *, const F77_INT &, F77_DBLE *, F77_DBLE *, F77_DBLE *, const F77_INT &, F77_DBLE *, const F77_INT &, F77_DBLE *, const F77_INT &, F77_DBLE *, F77_INT *, F77_INT &F77_CHAR_ARG_LEN_DECL F77_CHAR_ARG_LEN_DECL F77_CHAR_ARG_LEN_DECL)
F77_RET_T const F77_DBLE * x
subroutine qagi(f, bound, inf, epsabs, epsrel, result, abserr, neval, ier, limit, lenw, last, iwork, work)
subroutine qagp(f, a, b, npts2, points, epsabs, epsrel, result, abserr, neval, ier, leniw, lenw, last, iwork, work)