Mercurial > octave
diff libinterp/corefcn/quad.cc @ 29961:7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
Files affected: __betainc__.cc, __contourc__.cc, __eigs__.cc,
__expint__.cc, __ftp__.cc, __gammainc__.cc, __ichol__.cc, __ilu__.cc,
__magick_read__.cc, __pchip_deriv__.cc, __qp__.cc, amd.cc, balance.cc,
besselj.cc, bsxfun.cc, call-stack.cc, ccolamd.cc, cellfun.cc, chol.cc,
colamd.cc, colloc.cc, conv2.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc,
defaults.cc, dirfns.cc, display.cc, dlmread.cc, dmperm.cc, dot.cc,
eig.cc, ellipj.cc, environment.cc, error.cc, event-manager.cc, fft.cc,
fft2.cc, fftn.cc, file-io.cc, find.cc, gcd.cc, getgrent.cc,
getpwent.cc, getrusage.cc, gsvd.cc, hash.cc, help.cc, hess.cc,
hex2num.cc, input.cc, inv.cc, jsondecode.cc, jsonencode.cc,
load-path.cc, load-save.cc, lookup.cc, lsode.cc, lu.cc, max.cc,
mgorth.cc, oct-hist.cc, ordqz.cc, ordschur.cc, pager.cc, pr-output.cc,
psi.cc, qr.cc, quad.cc, quadcc.cc, qz.cc, rand.cc, regexp.cc,
schur.cc, settings.cc, sighandlers.cc, sparse.cc, spparms.cc,
sqrtm.cc, stream-euler.cc, strfind.cc, strfns.cc, sub2ind.cc, svd.cc,
symbfact.cc, symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc,
tril.cc, typecast.cc, urlwrite.cc, utils.cc, variables.cc,
__delaunayn__.cc, __fltk_uigetfile__.cc, __glpk__.cc,
__init_gnuplot__.cc, __ode15__.cc, __voronoi__.cc, audiodevinfo.cc,
audioread.cc, convhulln.cc, fftw.cc, gzip.cc, ov-cell.cc, ov-class.cc,
ov-classdef.cc, ov-fcn-handle.cc, ov-struct.cc, ov-typeinfo.cc,
ov-usr-fcn.cc, octave.cc, lex.ll, oct-parse.yy, profiler.cc,
andpt-eval.cc.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 14 Aug 2021 22:48:52 -0400 |
parents | 32c3a5805893 |
children | 796f54d4ddbf |
line wrap: on
line diff
--- a/libinterp/corefcn/quad.cc Sat Aug 14 21:50:26 2021 -0400 +++ b/libinterp/corefcn/quad.cc Sat Aug 14 22:48:52 2021 -0400 @@ -46,6 +46,8 @@ #include "Quad-opts.cc" +OCTAVE_NAMESPACE_BEGIN + // Global pointer for user defined function required by quadrature functions. static octave_value quad_fcn; @@ -55,7 +57,7 @@ // Is this a recursive call? static int call_depth = 0; -double +static double quad_user_function (double x) { double retval = 0.0; @@ -69,9 +71,9 @@ try { - tmp = octave::feval (quad_fcn, args, 1); + tmp = feval (quad_fcn, args, 1); } - catch (octave::execution_exception& ee) + catch (execution_exception& ee) { err_user_supplied_eval (ee, "quad"); } @@ -91,7 +93,7 @@ return retval; } -float +static float quad_float_user_function (float x) { float retval = 0.0; @@ -105,9 +107,9 @@ try { - tmp = octave::feval (quad_fcn, args, 1); + tmp = feval (quad_fcn, args, 1); } - catch (octave::execution_exception& ee) + catch (execution_exception& ee) { err_user_supplied_eval (ee, "quad"); } @@ -127,8 +129,6 @@ return retval; } -OCTAVE_NAMESPACE_BEGIN - DEFMETHODX ("quad", Fquad, interp, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{q} =} quad (@var{f}, @var{a}, @var{b}) @@ -182,13 +182,13 @@ warned_imaginary = false; - octave::unwind_protect_var<int> restore_var (call_depth); + unwind_protect_var<int> restore_var (call_depth); call_depth++; if (call_depth > 1) error ("quad: invalid recursive call"); - quad_fcn = octave::get_function_handle (interp, args(0), "x"); + quad_fcn = get_function_handle (interp, args(0), "x"); octave_value_list retval; @@ -201,18 +201,18 @@ FloatIndefQuad::IntegralType indef_type = FloatIndefQuad::doubly_infinite; float bound = 0.0; - if (octave::math::isinf (a) && octave::math::isinf (b)) + if (math::isinf (a) && math::isinf (b)) { indefinite = 1; indef_type = FloatIndefQuad::doubly_infinite; } - else if (octave::math::isinf (a)) + else if (math::isinf (a)) { indefinite = 1; bound = b; indef_type = FloatIndefQuad::neg_inf_to_bound; } - else if (octave::math::isinf (b)) + else if (math::isinf (b)) { indefinite = 1; bound = a; @@ -297,18 +297,18 @@ int indefinite = 0; IndefQuad::IntegralType indef_type = IndefQuad::doubly_infinite; double bound = 0.0; - if (octave::math::isinf (a) && octave::math::isinf (b)) + if (math::isinf (a) && math::isinf (b)) { indefinite = 1; indef_type = IndefQuad::doubly_infinite; } - else if (octave::math::isinf (a)) + else if (math::isinf (a)) { indefinite = 1; bound = b; indef_type = IndefQuad::neg_inf_to_bound; } - else if (octave::math::isinf (b)) + else if (math::isinf (b)) { indefinite = 1; bound = a;