NumCpp  1.0
A C++ implementation of the Python Numpy library
cyclic_hankel_2.hpp
Go to the documentation of this file.
1 #pragma once
30 
31 #include "NumCpp/NdArray.hpp"
33 
34 #include "boost/math/special_functions/hankel.hpp"
35 
36 #include <complex>
37 #include <type_traits>
38 
39 namespace nc
40 {
41  namespace special
42  {
43  //============================================================================
44  // Method Description:
52  template<typename dtype1, typename dtype2>
53  auto cyclic_hankel_2(dtype1 inV, dtype2 inX)
54  {
57 
58  return boost::math::cyl_hankel_2(inV, inX);
59  }
60 
61  //============================================================================
62  // Method Description:
70  template<typename dtype1, typename dtype2>
71  auto cyclic_hankel_2(dtype1 inV, const NdArray<dtype2>& inX)
72  {
73  NdArray<decltype(cyclic_hankel_2(dtype1{ 0 }, dtype2{ 0 }))> returnArray(inX.shape());
74 
75  stl_algorithms::transform(inX.cbegin(), inX.cend(), returnArray.begin(),
76  [inV](dtype2 x) -> auto
77  {
78  return cyclic_hankel_2(inV, x);
79  });
80 
81  return returnArray;
82  }
83  }
84 }
StaticAsserts.hpp
nc::special::cyclic_hankel_2
auto cyclic_hankel_2(dtype1 inV, dtype2 inX)
Definition: cyclic_hankel_2.hpp:53
nc::NdArray::shape
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4296
STATIC_ASSERT_ARITHMETIC
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:38
nc::NdArray
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:75
NdArray.hpp
nc::NdArray::cend
const_iterator cend() const noexcept
Definition: NdArrayCore.hpp:1491
nc
Definition: Coordinate.hpp:45
nc::stl_algorithms::transform
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction) noexcept
Definition: StlAlgorithms.hpp:703
nc::NdArray::cbegin
const_iterator cbegin() const noexcept
Definition: NdArrayCore.hpp:1147
nc::NdArray::begin
iterator begin() noexcept
Definition: NdArrayCore.hpp:1091