NumCpp
2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
c
d
e
g
h
i
j
m
n
o
p
s
t
v
Typedefs
Enumerations
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
c
d
e
i
l
m
n
p
r
s
t
v
x
y
z
Typedefs
a
c
d
i
p
r
s
t
v
Enumerations
Related Symbols
Files
File List
Globals
All
Macros
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
add.hpp
Go to the documentation of this file.
1
28
#pragma once
29
30
#include <complex>
31
32
#include "
NumCpp/NdArray.hpp
"
33
34
namespace
nc
35
{
36
//============================================================================
37
// Method Description:
46
template
<
typename
dtype>
47
NdArray<dtype>
add
(
const
NdArray<dtype>
&
inArray1
,
const
NdArray<dtype>
&
inArray2
)
48
{
49
return
inArray1
+
inArray2
;
50
}
47
NdArray<dtype>
add
(
const
NdArray<dtype>
&
inArray1
,
const
NdArray<dtype>
&
inArray2
) {
…
}
51
52
//============================================================================
53
// Method Description:
62
template
<
typename
dtype>
63
NdArray<dtype>
add
(
const
NdArray<dtype>
&
inArray
,
dtype
value)
64
{
65
return
inArray
+ value;
66
}
63
NdArray<dtype>
add
(
const
NdArray<dtype>
&
inArray
,
dtype
value) {
…
}
67
68
//============================================================================
69
// Method Description:
78
template
<
typename
dtype>
79
NdArray<dtype>
add
(
dtype
value,
const
NdArray<dtype>
&
inArray
)
80
{
81
return
value +
inArray
;
82
}
79
NdArray<dtype>
add
(
dtype
value,
const
NdArray<dtype>
&
inArray
) {
…
}
83
84
//============================================================================
85
// Method Description:
94
template
<
typename
dtype>
95
NdArray<std::complex<dtype>
>
add
(
const
NdArray<dtype>
&
inArray1
,
const
NdArray
<std::complex<dtype>>&
inArray2
)
96
{
97
return
inArray1
+
inArray2
;
98
}
95
NdArray<std::complex<dtype>
>
add
(
const
NdArray<dtype>
&
inArray1
,
const
NdArray
<std::complex<dtype>>&
inArray2
) {
…
}
99
100
//============================================================================
101
// Method Description:
110
template
<
typename
dtype>
111
NdArray<std::complex<dtype>
>
add
(
const
NdArray
<std::complex<dtype>>&
inArray1
,
const
NdArray<dtype>
&
inArray2
)
112
{
113
return
inArray1
+
inArray2
;
114
}
111
NdArray<std::complex<dtype>
>
add
(
const
NdArray
<std::complex<dtype>>&
inArray1
,
const
NdArray<dtype>
&
inArray2
) {
…
}
115
116
//============================================================================
117
// Method Description:
126
template
<
typename
dtype>
127
NdArray<std::complex<dtype>
>
add
(
const
NdArray<dtype>
&
inArray
,
const
std::complex<dtype>& value)
128
{
129
return
inArray
+ value;
130
}
127
NdArray<std::complex<dtype>
>
add
(
const
NdArray<dtype>
&
inArray
,
const
std::complex<dtype>& value) {
…
}
131
132
//============================================================================
133
// Method Description:
142
template
<
typename
dtype>
143
NdArray<std::complex<dtype>
>
add
(
const
std::complex<dtype>& value,
const
NdArray<dtype>
&
inArray
)
144
{
145
return
value +
inArray
;
146
}
143
NdArray<std::complex<dtype>
>
add
(
const
std::complex<dtype>& value,
const
NdArray<dtype>
&
inArray
) {
…
}
147
148
//============================================================================
149
// Method Description:
158
template
<
typename
dtype>
159
NdArray<std::complex<dtype>
>
add
(
const
NdArray
<std::complex<dtype>>&
inArray
,
dtype
value)
160
{
161
return
inArray
+ value;
162
}
159
NdArray<std::complex<dtype>
>
add
(
const
NdArray
<std::complex<dtype>>&
inArray
,
dtype
value) {
…
}
163
164
//============================================================================
165
// Method Description:
174
template
<
typename
dtype>
175
NdArray<std::complex<dtype>
>
add
(
dtype
value,
const
NdArray
<std::complex<dtype>>&
inArray
)
176
{
177
return
value +
inArray
;
178
}
175
NdArray<std::complex<dtype>
>
add
(
dtype
value,
const
NdArray
<std::complex<dtype>>&
inArray
) {
…
}
179
}
// namespace nc
NdArray.hpp
nc::NdArray
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition
NdArrayCore.hpp:139
nc
Definition
Cartesian.hpp:40
nc::arange
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition
arange.hpp:59
nc::add
NdArray< dtype > add(const NdArray< dtype > &inArray1, const NdArray< dtype > &inArray2)
Definition
add.hpp:47
include
NumCpp
Functions
add.hpp
Generated by
1.9.8