Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 09:41:23

0001 //  (C) Copyright Nick Thompson 2019.
0002 //  Use, modification and distribution are subject to the
0003 //  Boost Software License, Version 1.0. (See accompanying file
0004 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_MATH_INTERPOLATORS_CARDINAL_TRIGONOMETRIC_HPP
0007 #define BOOST_MATH_INTERPOLATORS_CARDINAL_TRIGONOMETRIC_HPP
0008 #include <memory>
0009 #include <boost/math/interpolators/detail/cardinal_trigonometric_detail.hpp>
0010 
0011 namespace boost { namespace math { namespace interpolators {
0012 
0013 template<class RandomAccessContainer>
0014 class cardinal_trigonometric
0015 {
0016 public:
0017     using Real = typename RandomAccessContainer::value_type;
0018     cardinal_trigonometric(RandomAccessContainer const & v, Real t0, Real h)
0019     {
0020         m_impl = std::make_shared<interpolators::detail::cardinal_trigonometric_detail<Real>>(v.data(), v.size(), t0, h);
0021     }
0022 
0023     Real operator()(Real t) const
0024     {
0025         return m_impl->operator()(t);
0026     }
0027 
0028     Real prime(Real t) const
0029     {
0030         return m_impl->prime(t);
0031     }
0032 
0033     Real double_prime(Real t) const
0034     {
0035         return m_impl->double_prime(t);
0036     }
0037 
0038     Real period() const
0039     {
0040         return m_impl->period();
0041     }
0042 
0043     Real integrate() const
0044     {
0045         return m_impl->integrate();
0046     }
0047 
0048     Real squared_l2() const
0049     {
0050         return m_impl->squared_l2();
0051     }
0052 
0053 private:
0054     std::shared_ptr<interpolators::detail::cardinal_trigonometric_detail<Real>> m_impl;
0055 };
0056 
0057 }}}
0058 #endif