![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/include/boost/math/quadrature/ |
Upload File : |
// Copyright Nick Thompson, 2017 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) /* * This class performs sinh-sinh quadrature over the entire real line. * * References: * * 1) Tanaka, Ken'ichiro, et al. "Function classes for double exponential integration formulas." Numerische Mathematik 111.4 (2009): 631-655. */ #ifndef BOOST_MATH_QUADRATURE_SINH_SINH_HPP #define BOOST_MATH_QUADRATURE_SINH_SINH_HPP #include <cmath> #include <limits> #include <memory> #include <boost/math/quadrature/detail/sinh_sinh_detail.hpp> namespace boost{ namespace math{ namespace quadrature { template<class Real, class Policy = boost::math::policies::policy<> > class sinh_sinh { public: sinh_sinh(size_t max_refinements = 9) : m_imp(std::make_shared<detail::sinh_sinh_detail<Real, Policy> >(max_refinements)) {} template<class F> auto integrate(const F f, Real tol = boost::math::tools::root_epsilon<Real>(), Real* error = nullptr, Real* L1 = nullptr, std::size_t* levels = nullptr)->decltype(std::declval<F>()(std::declval<Real>())) const { return m_imp->integrate(f, tol, error, L1, levels); } private: std::shared_ptr<detail::sinh_sinh_detail<Real, Policy>> m_imp; }; }}} #endif