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