NumCpp  2.7.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
bessel_kn_prime.hpp
Go to the documentation of this file.
1 #pragma once
29 
30 #ifndef NUMCPP_NO_USE_BOOST
31 
34 #include "NumCpp/NdArray.hpp"
35 
36 #include "boost/math/special_functions/bessel_prime.hpp"
37 
38 #include <type_traits>
39 
40 namespace nc
41 {
42  namespace special
43  {
44  //============================================================================
45  // Method Description:
53  template<typename dtype1, typename dtype2>
54  auto bessel_kn_prime(dtype1 inV, dtype2 inX)
55  {
58 
59  return boost::math::cyl_bessel_k_prime(inV, inX);
60  }
61 
62  //============================================================================
63  // Method Description:
71  template<typename dtype1, typename dtype2>
72  auto bessel_kn_prime(dtype1 inV, const NdArray<dtype2>& inArrayX)
73  {
74  NdArray<decltype(bessel_kn_prime(dtype1{ 0 }, dtype2{ 0 }))> returnArray(inArrayX.shape());
75 
76  stl_algorithms::transform(inArrayX.cbegin(), inArrayX.cend(), returnArray.begin(),
77  [inV](dtype2 inX) -> auto
78  {
79  return bessel_kn_prime(inV, inX);
80  });
81 
82  return returnArray;
83  }
84  } // namespace special
85 } // namespace nc
86 
87 #endif // #ifndef NUMCPP_NO_USE_BOOST
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:37
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:72
const_iterator cbegin() const noexcept
Definition: NdArrayCore.hpp:1216
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4283
const_iterator cend() const noexcept
Definition: NdArrayCore.hpp:1524
iterator begin() noexcept
Definition: NdArrayCore.hpp:1166
auto bessel_kn_prime(dtype1 inV, dtype2 inX)
Definition: bessel_kn_prime.hpp:54
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition: StlAlgorithms.hpp:702
Definition: Coordinate.hpp:45