Stavros Macrakis wrote:
> Ray,
>
> The quad_xxx routines are pretty low-level; I wonder if they should be
> advertised to users at all.
>
> Though sophisticated users will surely want to control the details of
> which integration algorithm they use, general users shouldn't have to
> worry about that. And even for the sophisticated user, the high-level
> interface could be something like:
>
> numeric_integrate( foo(x),x,a,b, method = quad_qagi)
>
A long time ago, Wolfgang Jenkner (?) proposed a common interface.
AFAIK, nothing came of it. Some details had to be worked out.
> There remains the question of where to put all the additional
> information the quad_xxx routines return. Ideally, instead of having
> the numeric approximation and the error be returned separately, they'd
> be returned as some sort of interval; but of course we don't currently
> support intervals. Do most users care about the number of integrand
> evaluations? If not, this could be returned as a global (yuck, but...)
> or as an out variable e.g. numeric_integrate(..., evaluation_count =
> 'evalcountvar). As for the error code, the routine should just raise an
> exception.
The interface is what it is because no one (including me) proposed a
better one. I wanted the number of evaluations mostly so I could
compare that with the examples from the Quadpack book. And the error
code was needed so you knew something bad happened since no errors were
signaled.
I'm certainly open to suggestions on what to do.
Ray