NumCpp  2.1.0
A C++ implementation of the Python Numpy library
airy_ai.hpp
Go to the documentation of this file.
1 #pragma once
30 
33 #include "NumCpp/NdArray.hpp"
34 
35 #include "boost/math/special_functions/airy.hpp"
36 
37 namespace nc
38 {
39  namespace special
40  {
41  //============================================================================
42  // Method Description:
51  template<typename dtype>
52  auto airy_ai(dtype inValue)
53  {
55 
56  return boost::math::airy_ai(inValue);
57  }
58 
59  //============================================================================
60  // Method Description:
69  template<typename dtype>
70  auto airy_ai(const NdArray<dtype>& inArray)
71  {
72  NdArray<decltype(airy_ai(dtype{ 0 })) > returnArray(inArray.shape());
73 
74  stl_algorithms::transform(inArray.cbegin(), inArray.cend(), returnArray.begin(),
75  [](dtype inValue) -> auto
76  {
77  return airy_ai(inValue);
78  });
79 
80  return returnArray;
81  }
82  } // namespace special
83 } // namespace nc
StaticAsserts.hpp
nc::special::airy_ai
auto airy_ai(dtype inValue)
Definition: airy_ai.hpp:52
nc::NdArray::shape
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4312
STATIC_ASSERT_ARITHMETIC
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:38
nc::special::airy_ai
auto airy_ai(const NdArray< dtype > &inArray)
Definition: airy_ai.hpp:70
nc::NdArray< dtype >
nc::stl_algorithms::transform
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition: StlAlgorithms.hpp:703
NdArray.hpp
nc::NdArray::cend
const_iterator cend() const noexcept
Definition: NdArrayCore.hpp:1491
nc
Definition: Coordinate.hpp:45
nc::NdArray::cbegin
const_iterator cbegin() const noexcept
Definition: NdArrayCore.hpp:1147
StlAlgorithms.hpp
nc::NdArray::begin
iterator begin() noexcept
Definition: NdArrayCore.hpp:1091