NumCpp
2.4.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:
47
template
<
typename
dtype>
48
NdArray<dtype>
multiply
(
const
NdArray<dtype>
& inArray1,
const
NdArray<dtype>
& inArray2)
49
{
50
return
inArray1 * inArray2;
51
}
52
53
//============================================================================
54
// Method Description:
64
template
<
typename
dtype>
65
NdArray<dtype>
multiply
(
const
NdArray<dtype>
& inArray, dtype value)
66
{
67
return
inArray * value;
68
}
69
70
//============================================================================
71
// Method Description:
81
template
<
typename
dtype>
82
NdArray<dtype>
multiply
(dtype value,
const
NdArray<dtype>
& inArray)
83
{
84
return
value * inArray;
85
}
86
87
//============================================================================
88
// Method Description:
98
template
<
typename
dtype>
99
NdArray<std::complex<dtype>
>
multiply
(
const
NdArray<dtype>
& inArray1,
const
NdArray
<std::complex<dtype>>& inArray2)
100
{
101
return
inArray1 * inArray2;
102
}
103
104
//============================================================================
105
// Method Description:
115
template
<
typename
dtype>
116
NdArray<std::complex<dtype>
>
multiply
(
const
NdArray
<std::complex<dtype>>& inArray1,
const
NdArray<dtype>
& inArray2)
117
{
118
return
inArray1 * inArray2;
119
}
120
121
//============================================================================
122
// Method Description:
132
template
<
typename
dtype>
133
NdArray<std::complex<dtype>
>
multiply
(
const
NdArray<dtype>
& inArray,
const
std::complex<dtype>& value)
134
{
135
return
inArray * value;
136
}
137
138
//============================================================================
139
// Method Description:
149
template
<
typename
dtype>
150
NdArray<std::complex<dtype>
>
multiply
(
const
std::complex<dtype>& value,
const
NdArray<dtype>
& inArray)
151
{
152
return
value * inArray;
153
}
154
155
//============================================================================
156
// Method Description:
166
template
<
typename
dtype>
167
NdArray<std::complex<dtype>
>
multiply
(
const
NdArray
<std::complex<dtype>>& inArray, dtype value)
168
{
169
return
inArray * value;
170
}
171
172
//============================================================================
173
// Method Description:
183
template
<
typename
dtype>
184
NdArray<std::complex<dtype>
>
multiply
(dtype value,
const
NdArray
<std::complex<dtype>>& inArray)
185
{
186
return
value * inArray;
187
}
188
}
// namespace nc
nc::NdArray< dtype >
NdArray.hpp
nc
Definition:
Coordinate.hpp:44
nc::multiply
NdArray< dtype > multiply(const NdArray< dtype > &inArray1, const NdArray< dtype > &inArray2)
Definition:
multiply.hpp:48
include
NumCpp
Functions
multiply.hpp
Generated by
1.8.17