Skip to content

more subroutines for integrate()

4 messages · Thomas Lumley, Brandon Whitcher, Brian Ripley

#
I was pleased to find integrate() using the quadpack routines "dqags" and
"dqagi".  However, I would also like to have the routine "dqawoe"
included.  This routine is summarized as follows...

c***keywords  automatic integrator, special-purpose,
c             integrand with oscillatory cos or sin factor,
c             clenshaw-curtis method, (end point) singularities,
c             extrapolation, globally adaptive
c***author  piessens,robert,appl. math. & progr. div. - k.u.leuven
c           de doncker,elise,appl. math. & progr. div. - k.u.leuven
c***purpose  the routine calculates an approximation result to a given
c            definite integral
c            i = integral of f(x)*w(x) over (a,b)
c            where w(x) = cos(omega*x) or w(x) = sin(omega*x),
c            hopefully satisfying following claim for accuracy
c            abs(i-result).le.max(epsabs,epsrel*abs(i)).

This is useful for numeric (inverse) Fourier transforms.  Is there any
hope?

cheers...

Brandon

----------------------------------------------------------------------------
  Geophysical Statistics Project
  National Center for Atmospheric Research          +1 303 497 1709  voice
  P.O. Box 3000, Boulder, CO  80307-3000            +1 303 497 1333  fax

  whitcher at ucar.edu                            www.cgd.ucar.edu/~whitcher/
----------------------------------------------------------------------------



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 12 Jul 2001, Brandon Whitcher wrote:

            
If you are working under Unix it shouldn't be too hard to add this
yourself following the code in src/appl/integrate.c (and then submit
patches).  It looks like an addition that would be useful but it may not
be a high enough priority to actually get done.


	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
3 days later
#
On Thu, 12 Jul 2001, Thomas Lumley wrote:

            
Thanks for your response.

I've looked at the src/appl/integrate.c code.  I'm sure it would be more
efficient if the author of this code augmented it, but time and priority
are always factors.  I'll give it a try when I get a chance.

Brandon

----------------------------------------------------------------------------
  Geophysical Statistics Project
  National Center for Atmospheric Research          +1 303 497 1709  voice
  P.O. Box 3000, Boulder, CO  80307-3000            +1 303 497 1333  fax

  whitcher at ucar.edu                            www.cgd.ucar.edu/~whitcher/
----------------------------------------------------------------------------



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Sun, 15 Jul 2001, Brandon Whitcher wrote:

            
The author of the code has no interest in extending this, and he suggests
you write an R package rather than overload the built-in facilities (which
are intended only to be tolerably efficient for two common cases, not a
complete interface to quadpack).  But as Thomas says, we would consider
patches.