File indexing completed on 2025-01-18 09:39:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_MATH_QUADRATURE_SINH_SINH_HPP
0016 #define BOOST_MATH_QUADRATURE_SINH_SINH_HPP
0017
0018 #include <cmath>
0019 #include <limits>
0020 #include <memory>
0021 #include <boost/math/quadrature/detail/sinh_sinh_detail.hpp>
0022
0023 namespace boost{ namespace math{ namespace quadrature {
0024
0025 template<class Real, class Policy = boost::math::policies::policy<> >
0026 class sinh_sinh
0027 {
0028 public:
0029 sinh_sinh(size_t max_refinements = 9)
0030 : m_imp(std::make_shared<detail::sinh_sinh_detail<Real, Policy> >(max_refinements)) {}
0031
0032 template<class F>
0033 auto integrate(const F f, Real tol = boost::math::tools::root_epsilon<Real>(), Real* error = nullptr, Real* L1 = nullptr, std::size_t* levels = nullptr) const ->decltype(std::declval<F>()(std::declval<Real>()))
0034 {
0035 return m_imp->integrate(f, tol, error, L1, levels);
0036 }
0037
0038 private:
0039 std::shared_ptr<detail::sinh_sinh_detail<Real, Policy>> m_imp;
0040 };
0041
0042 }}}
0043 #endif