NumCpp  2.7.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
multiply.hpp
Go to the documentation of this file.
1 #pragma once
29 
30 #include "NumCpp/NdArray.hpp"
31 
32 #include <complex>
33 
34 namespace nc
35 {
36  //============================================================================
37  // Method Description:
46  template<typename dtype>
47  NdArray<dtype> multiply(const NdArray<dtype>& inArray1, const NdArray<dtype>& inArray2)
48  {
49  return inArray1 * inArray2;
50  }
51 
52  //============================================================================
53  // Method Description:
62  template<typename dtype>
63  NdArray<dtype> multiply(const NdArray<dtype>& inArray, dtype value)
64  {
65  return inArray * value;
66  }
67 
68  //============================================================================
69  // Method Description:
78  template<typename dtype>
79  NdArray<dtype> multiply(dtype value, const NdArray<dtype>& inArray)
80  {
81  return value * inArray;
82  }
83 
84  //============================================================================
85  // Method Description:
94  template<typename dtype>
95  NdArray<std::complex<dtype>> multiply(const NdArray<dtype>& inArray1, const NdArray<std::complex<dtype>>& inArray2)
96  {
97  return inArray1 * inArray2;
98  }
99 
100  //============================================================================
101  // Method Description:
110  template<typename dtype>
111  NdArray<std::complex<dtype>> multiply(const NdArray<std::complex<dtype>>& inArray1, const NdArray<dtype>& inArray2)
112  {
113  return inArray1 * inArray2;
114  }
115 
116  //============================================================================
117  // Method Description:
126  template<typename dtype>
127  NdArray<std::complex<dtype>> multiply(const NdArray<dtype>& inArray, const std::complex<dtype>& value)
128  {
129  return inArray * value;
130  }
131 
132  //============================================================================
133  // Method Description:
142  template<typename dtype>
143  NdArray<std::complex<dtype>> multiply(const std::complex<dtype>& value, const NdArray<dtype>& inArray)
144  {
145  return value * inArray;
146  }
147 
148  //============================================================================
149  // Method Description:
158  template<typename dtype>
159  NdArray<std::complex<dtype>> multiply(const NdArray<std::complex<dtype>>& inArray, dtype value)
160  {
161  return inArray * value;
162  }
163 
164  //============================================================================
165  // Method Description:
174  template<typename dtype>
175  NdArray<std::complex<dtype>> multiply(dtype value, const NdArray<std::complex<dtype>>& inArray)
176  {
177  return value * inArray;
178  }
179 } // namespace nc
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:72
Definition: Coordinate.hpp:45
NdArray< dtype > multiply(const NdArray< dtype > &inArray1, const NdArray< dtype > &inArray2)
Definition: multiply.hpp:47