1 // Copyright Nick Thompson, 2019
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt
5 // or copy at http://www.boost.org/LICENSE_1_0.txt)
9 * Ooura, Takuya, and Masatake Mori. "A robust double exponential formula for Fourier-type integrals." Journal of computational and applied mathematics 112.1-2 (1999): 229-241.
10 * http://www.kurims.kyoto-u.ac.jp/~ooura/intde.html
12 #ifndef BOOST_MATH_QUADRATURE_OOURA_FOURIER_INTEGRALS_HPP
13 #define BOOST_MATH_QUADRATURE_OOURA_FOURIER_INTEGRALS_HPP
15 #include <boost/math/quadrature/detail/ooura_fourier_integrals_detail.hpp>
17 namespace boost { namespace math { namespace quadrature {
20 class ooura_fourier_sin {
22 ooura_fourier_sin(const Real relative_error_tolerance = tools::root_epsilon<Real>(), size_t levels = sizeof(Real)) : impl_(std::make_shared<detail::ooura_fourier_sin_detail<Real>>(relative_error_tolerance, levels))
26 std::pair<Real, Real> integrate(F const & f, Real omega) {
27 return impl_->integrate(f, omega);
30 // These are just for debugging/unit tests:
31 std::vector<std::vector<Real>> const & big_nodes() const {
32 return impl_->big_nodes();
35 std::vector<std::vector<Real>> const & weights_for_big_nodes() const {
36 return impl_->weights_for_big_nodes();
39 std::vector<std::vector<Real>> const & little_nodes() const {
40 return impl_->little_nodes();
43 std::vector<std::vector<Real>> const & weights_for_little_nodes() const {
44 return impl_->weights_for_little_nodes();
48 std::shared_ptr<detail::ooura_fourier_sin_detail<Real>> impl_;
53 class ooura_fourier_cos {
55 ooura_fourier_cos(const Real relative_error_tolerance = tools::root_epsilon<Real>(), size_t levels = sizeof(Real)) : impl_(std::make_shared<detail::ooura_fourier_cos_detail<Real>>(relative_error_tolerance, levels))
59 std::pair<Real, Real> integrate(F const & f, Real omega) {
60 return impl_->integrate(f, omega);
63 std::shared_ptr<detail::ooura_fourier_cos_detail<Real>> impl_;