NumCpp  2.18.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
spherical_hankel_2.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#ifndef NUMCPP_NO_USE_BOOST
31
32#include <complex>
33
34#include "boost/math/special_functions/hankel.hpp"
35
37#include "NumCpp/NdArray.hpp"
38
39namespace nc::special
40{
41 //============================================================================
42 // Method Description:
50 template<typename dtype1, typename dtype2>
51 std::complex<double> spherical_hankel_2(dtype1 inV, dtype2 inX)
52 {
55
56 return boost::math::sph_hankel_2(inV, inX);
57 }
58
59 //============================================================================
60 // Method Description:
68 template<typename dtype1, typename dtype2>
69 auto spherical_hankel_2(dtype1 inV, const NdArray<dtype2>& inArray)
70 {
71 NdArray<decltype(spherical_hankel_2(dtype1{ 0 }, dtype2{ 0 }))> returnArray(inArray.shape());
72
74 inArray.cend(),
75 returnArray.begin(),
76 [inV](dtype2 inValue) -> auto { return spherical_hankel_2(inV, inValue); });
77
78 return returnArray;
79 }
80} // namespace nc::special
81
82#endif // #ifndef NUMCPP_NO_USE_BOOST
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:135
const_iterator cbegin() const noexcept
Definition NdArrayCore.hpp:1361
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4587
const_iterator cend() const noexcept
Definition NdArrayCore.hpp:1669
Definition airy_ai.hpp:39
std::complex< double > spherical_hankel_2(dtype1 inV, dtype2 inX)
Definition spherical_hankel_2.hpp:51
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition StlAlgorithms.hpp:776