gslcpp
Modern-C++ Wrapper for GSL
add.hpp
Go to the documentation of this file.
1 /// @file include/gslcpp/wrap/add.hpp
2 /// @copyright 2022 Thomas E. Vaughan, all rights reserved.
3 /// @brief Definition of gsl::w_add().
4 
5 #pragma once
6 #include "container.hpp" // w_vector
7 
8 namespace gsl {
9 
10 
11 /// Element by element, accumulate `v` into `u`.
12 /// `add` is overloaded to provide the same name for every type of vector.
13 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
14 /// @param u Pointer to vector to be modified.
15 /// @param v Pointer to vector to be added in to `u`.
16 /// @return TBD: GSL's documentation does not specify.
17 inline int w_add(w_vector<double> *u, w_vector<double const> *v) {
18  return gsl_vector_add(u, v);
19 }
20 
21 
22 /// Element by element, accumulate `v` into `u`.
23 /// `add` is overloaded to provide the same name for every type of vector.
24 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
25 /// @param u Pointer to vector to be modified.
26 /// @param v Pointer to vector to be added in to `u`.
27 /// @return TBD: GSL's documentation does not specify.
28 inline int w_add(w_vector<float> *u, w_vector<float const> *v) {
29  return gsl_vector_float_add(u, v);
30 }
31 
32 
33 /// Element by element, accumulate `v` into `u`.
34 /// `add` is overloaded to provide the same name for every type of vector.
35 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
36 /// @param u Pointer to vector to be modified.
37 /// @param v Pointer to vector to be added in to `u`.
38 /// @return TBD: GSL's documentation does not specify.
39 inline int w_add(w_vector<long double> *u, w_vector<long double const> *v) {
40  return gsl_vector_long_double_add(u, v);
41 }
42 
43 
44 /// Element by element, accumulate `v` into `u`.
45 /// `add` is overloaded to provide the same name for every type of vector.
46 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
47 /// @param u Pointer to vector to be modified.
48 /// @param v Pointer to vector to be added in to `u`.
49 /// @return TBD: GSL's documentation does not specify.
50 inline int w_add(w_vector<int> *u, w_vector<int const> *v) {
51  return gsl_vector_int_add(u, v);
52 }
53 
54 
55 /// Element by element, accumulate `v` into `u`.
56 /// `add` is overloaded to provide the same name for every type of vector.
57 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
58 /// @param u Pointer to vector to be modified.
59 /// @param v Pointer to vector to be added in to `u`.
60 /// @return TBD: GSL's documentation does not specify.
61 inline int w_add(w_vector<unsigned> *u, w_vector<unsigned const> *v) {
62  return gsl_vector_uint_add(u, v);
63 }
64 
65 
66 /// Element by element, accumulate `v` into `u`.
67 /// `add` is overloaded to provide the same name for every type of vector.
68 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
69 /// @param u Pointer to vector to be modified.
70 /// @param v Pointer to vector to be added in to `u`.
71 /// @return TBD: GSL's documentation does not specify.
72 inline int w_add(w_vector<long> *u, w_vector<long const> *v) {
73  return gsl_vector_long_add(u, v);
74 }
75 
76 
77 /// Element by element, accumulate `v` into `u`.
78 /// `add` is overloaded to provide the same name for every type of vector.
79 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
80 /// @param u Pointer to vector to be modified.
81 /// @param v Pointer to vector to be added in to `u`.
82 /// @return TBD: GSL's documentation does not specify.
83 inline int
84 w_add(w_vector<unsigned long> *u, w_vector<unsigned long const> *v) {
85  return gsl_vector_ulong_add(u, v);
86 }
87 
88 
89 /// Element by element, accumulate `v` into `u`.
90 /// `add` is overloaded to provide the same name for every type of vector.
91 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
92 /// @param u Pointer to vector to be modified.
93 /// @param v Pointer to vector to be added in to `u`.
94 /// @return TBD: GSL's documentation does not specify.
95 inline int w_add(w_vector<short> *u, w_vector<short const> *v) {
96  return gsl_vector_short_add(u, v);
97 }
98 
99 
100 /// Element by element, accumulate `v` into `u`.
101 /// `add` is overloaded to provide the same name for every type of vector.
102 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
103 /// @param u Pointer to vector to be modified.
104 /// @param v Pointer to vector to be added in to `u`.
105 /// @return TBD: GSL's documentation does not specify.
106 inline int
107 w_add(w_vector<unsigned short> *u, w_vector<unsigned short const> *v) {
108  return gsl_vector_ushort_add(u, v);
109 }
110 
111 
112 /// Element by element, accumulate `v` into `u`.
113 /// `add` is overloaded to provide the same name for every type of vector.
114 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
115 /// @param u Pointer to vector to be modified.
116 /// @param v Pointer to vector to be added in to `u`.
117 /// @return TBD: GSL's documentation does not specify.
118 inline int w_add(w_vector<char> *u, w_vector<char const> *v) {
119  return gsl_vector_char_add(u, v);
120 }
121 
122 
123 /// Element by element, accumulate `v` into `u`.
124 /// `add` is overloaded to provide the same name for every type of vector.
125 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
126 /// @param u Pointer to vector to be modified.
127 /// @param v Pointer to vector to be added in to `u`.
128 /// @return TBD: GSL's documentation does not specify.
129 inline int
130 w_add(w_vector<unsigned char> *u, w_vector<unsigned char const> *v) {
131  return gsl_vector_uchar_add(u, v);
132 }
133 
134 
135 /// Element by element, accumulate `v` into `u`.
136 /// `add` is overloaded to provide the same name for every type of vector.
137 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
138 /// @param u Pointer to vector to be modified.
139 /// @param v Pointer to vector to be added in to `u`.
140 /// @return TBD: GSL's documentation does not specify.
141 inline int
142 w_add(w_vector<complex<double>> *u, w_vector<complex<double> const> *v) {
143  return gsl_vector_complex_add(u, v);
144 }
145 
146 
147 /// Element by element, accumulate `v` into `u`.
148 /// `add` is overloaded to provide the same name for every type of vector.
149 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
150 /// @param u Pointer to vector to be modified.
151 /// @param v Pointer to vector to be added in to `u`.
152 /// @return TBD: GSL's documentation does not specify.
153 inline int
154 w_add(w_vector<complex<float>> *u, w_vector<complex<float> const> *v) {
155  return gsl_vector_complex_float_add(u, v);
156 }
157 
158 
159 /// Element by element, accumulate `v` into `u`.
160 /// `add` is overloaded to provide the same name for every type of vector.
161 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_add
162 /// @param u Pointer to vector to be modified.
163 /// @param v Pointer to vector to be added in to `u`.
164 /// @return TBD: GSL's documentation does not specify.
165 inline int
166 w_add(w_vector<complex<long double>> *u,
167  w_vector<complex<long double> const> *v) {
168  return gsl_vector_complex_long_double_add(u, v);
169 }
170 
171 
172 } // namespace gsl
173 
174 // EOF
gsl::w_add
int w_add(w_vector< unsigned > *u, w_vector< unsigned const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:61
gsl::w_add
int w_add(w_vector< double > *u, w_vector< double const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:17
gsl::w_add
int w_add(w_vector< complex< long double >> *u, w_vector< complex< long double > const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:166
gsl::w_add
int w_add(w_vector< unsigned long > *u, w_vector< unsigned long const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:84
gsl::w_add
int w_add(w_vector< long > *u, w_vector< long const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:72
gsl::w_add
int w_add(w_vector< float > *u, w_vector< float const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:28
gsl::w_add
int w_add(w_vector< unsigned char > *u, w_vector< unsigned char const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:130
gsl::w_add
int w_add(w_vector< complex< double >> *u, w_vector< complex< double > const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:142
gsl::w_add
int w_add(w_vector< int > *u, w_vector< int const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:50
gsl::w_add
int w_add(w_vector< unsigned short > *u, w_vector< unsigned short const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:107
gsl::w_add
int w_add(w_vector< char > *u, w_vector< char const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:118
gsl::w_add
int w_add(w_vector< complex< float >> *u, w_vector< complex< float > const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:154
gsl
Namespace for C++-interface to GSL.
Definition: v-iface.hpp:51
gsl::w_add
int w_add(w_vector< short > *u, w_vector< short const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:95
gsl::w_add
int w_add(w_vector< long double > *u, w_vector< long double const > *v)
Element by element, accumulate v into u.
Definition: add.hpp:39