gslcpp
Modern-C++ Wrapper for GSL
axpby.hpp
Go to the documentation of this file.
1 /// @file include/gslcpp/wrap/axpby.hpp
2 /// @copyright 2022 Thomas E. Vaughan, all rights reserved.
3 /// @brief Definition of gsl::w_axpby().
4 
5 #pragma once
6 #include "container.hpp" // w_vector
7 
8 namespace gsl {
9 
10 
11 /// Perform the logical equivalent of `y = a*x + b*y`.
12 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
13 ///
14 /// @param a Coefficient of vector `x`.
15 /// @param x Pointer to vector that is multiplied by `a`.
16 /// @param b Coefficient of vector `y`.
17 /// @param y Pointer to vector that is multiplied by `b` and then updated as
18 /// `a*x + b*y`.
19 /// @return TBD: GSL's documentation does not specify.
20 inline int w_axpby(
21  double const &a,
22  w_vector<double const> *x,
23  double const &b,
24  w_vector<double> *y) {
25  return gsl_vector_axpby(a, x, b, y);
26 }
27 
28 
29 /// Perform the logical equivalent of `y = a*x + b*y`.
30 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
31 ///
32 /// @param a Coefficient of vector `x`.
33 /// @param x Pointer to vector that is multiplied by `a`.
34 /// @param b Coefficient of vector `y`.
35 /// @param y Pointer to vector that is multiplied by `b` and then updated as
36 /// `a*x + b*y`.
37 /// @return TBD: GSL's documentation does not specify.
38 inline int w_axpby(
39  float const &a,
40  w_vector<float const> *x,
41  float const &b,
42  w_vector<float> *y) {
43  return gsl_vector_float_axpby(a, x, b, y);
44 }
45 
46 
47 /// Perform the logical equivalent of `y = a*x + b*y`.
48 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
49 ///
50 /// @param a Coefficient of vector `x`.
51 /// @param x Pointer to vector that is multiplied by `a`.
52 /// @param b Coefficient of vector `y`.
53 /// @param y Pointer to vector that is multiplied by `b` and then updated as
54 /// `a*x + b*y`.
55 /// @return TBD: GSL's documentation does not specify.
56 inline int w_axpby(
57  long double const &a,
58  w_vector<long double const> *x,
59  long double const &b,
60  w_vector<long double> *y) {
61  return gsl_vector_long_double_axpby(a, x, b, y);
62 }
63 
64 
65 /// Perform the logical equivalent of `y = a*x + b*y`.
66 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
67 ///
68 /// @param a Coefficient of vector `x`.
69 /// @param x Pointer to vector that is multiplied by `a`.
70 /// @param b Coefficient of vector `y`.
71 /// @param y Pointer to vector that is multiplied by `b` and then updated as
72 /// `a*x + b*y`.
73 /// @return TBD: GSL's documentation does not specify.
74 inline int
75 w_axpby(int const &a, w_vector<int const> *x, int const &b, w_vector<int> *y) {
76  return gsl_vector_int_axpby(a, x, b, y);
77 }
78 
79 
80 /// Perform the logical equivalent of `y = a*x + b*y`.
81 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
82 ///
83 /// @param a Coefficient of vector `x`.
84 /// @param x Pointer to vector that is multiplied by `a`.
85 /// @param b Coefficient of vector `y`.
86 /// @param y Pointer to vector that is multiplied by `b` and then updated as
87 /// `a*x + b*y`.
88 /// @return TBD: GSL's documentation does not specify.
89 inline int w_axpby(
90  unsigned const &a,
91  w_vector<unsigned const> *x,
92  unsigned const &b,
93  w_vector<unsigned> *y) {
94  return gsl_vector_uint_axpby(a, x, b, y);
95 }
96 
97 
98 /// Perform the logical equivalent of `y = a*x + b*y`.
99 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
100 ///
101 /// @param a Coefficient of vector `x`.
102 /// @param x Pointer to vector that is multiplied by `a`.
103 /// @param b Coefficient of vector `y`.
104 /// @param y Pointer to vector that is multiplied by `b` and then updated as
105 /// `a*x + b*y`.
106 /// @return TBD: GSL's documentation does not specify.
107 inline int w_axpby(
108  long const &a,
109  w_vector<long const> *x,
110  long const &b,
111  w_vector<long> *y) {
112  return gsl_vector_long_axpby(a, x, b, y);
113 }
114 
115 
116 /// Perform the logical equivalent of `y = a*x + b*y`.
117 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
118 ///
119 /// @param a Coefficient of vector `x`.
120 /// @param x Pointer to vector that is multiplied by `a`.
121 /// @param b Coefficient of vector `y`.
122 /// @param y Pointer to vector that is multiplied by `b` and then updated as
123 /// `a*x + b*y`.
124 /// @return TBD: GSL's documentation does not specify.
125 inline int w_axpby(
126  unsigned long const &a,
127  w_vector<unsigned long const> *x,
128  unsigned long const &b,
129  w_vector<unsigned long> *y) {
130  return gsl_vector_ulong_axpby(a, x, b, y);
131 }
132 
133 
134 /// Perform the logical equivalent of `y = a*x + b*y`.
135 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
136 ///
137 /// @param a Coefficient of vector `x`.
138 /// @param x Pointer to vector that is multiplied by `a`.
139 /// @param b Coefficient of vector `y`.
140 /// @param y Pointer to vector that is multiplied by `b` and then updated as
141 /// `a*x + b*y`.
142 /// @return TBD: GSL's documentation does not specify.
143 inline int w_axpby(
144  short const &a,
145  w_vector<short const> *x,
146  short const &b,
147  w_vector<short> *y) {
148  return gsl_vector_short_axpby(a, x, b, y);
149 }
150 
151 
152 /// Perform the logical equivalent of `y = a*x + b*y`.
153 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
154 ///
155 /// @param a Coefficient of vector `x`.
156 /// @param x Pointer to vector that is multiplied by `a`.
157 /// @param b Coefficient of vector `y`.
158 /// @param y Pointer to vector that is multiplied by `b` and then updated as
159 /// `a*x + b*y`.
160 /// @return TBD: GSL's documentation does not specify.
161 inline int w_axpby(
162  unsigned short const &a,
163  w_vector<unsigned short const> *x,
164  unsigned short const &b,
165  w_vector<unsigned short> *y) {
166  return gsl_vector_ushort_axpby(a, x, b, y);
167 }
168 
169 
170 /// Perform the logical equivalent of `y = a*x + b*y`.
171 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
172 ///
173 /// @param a Coefficient of vector `x`.
174 /// @param x Pointer to vector that is multiplied by `a`.
175 /// @param b Coefficient of vector `y`.
176 /// @param y Pointer to vector that is multiplied by `b` and then updated as
177 /// `a*x + b*y`.
178 /// @return TBD: GSL's documentation does not specify.
179 inline int w_axpby(
180  char const &a,
181  w_vector<char const> *x,
182  char const &b,
183  w_vector<char> *y) {
184  return gsl_vector_char_axpby(a, x, b, y);
185 }
186 
187 
188 /// Perform the logical equivalent of `y = a*x + b*y`.
189 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
190 ///
191 /// @param a Coefficient of vector `x`.
192 /// @param x Pointer to vector that is multiplied by `a`.
193 /// @param b Coefficient of vector `y`.
194 /// @param y Pointer to vector that is multiplied by `b` and then updated as
195 /// `a*x + b*y`.
196 /// @return TBD: GSL's documentation does not specify.
197 inline int w_axpby(
198  unsigned char const &a,
199  w_vector<unsigned char const> *x,
200  unsigned char const &b,
201  w_vector<unsigned char> *y) {
202  return gsl_vector_uchar_axpby(a, x, b, y);
203 }
204 
205 
206 /// Perform the logical equivalent of `y = a*x + b*y`.
207 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
208 ///
209 /// @param a Coefficient of vector `x`.
210 /// @param x Pointer to vector that is multiplied by `a`.
211 /// @param b Coefficient of vector `y`.
212 /// @param y Pointer to vector that is multiplied by `b` and then updated as
213 /// `a*x + b*y`.
214 /// @return TBD: GSL's documentation does not specify.
215 inline int w_axpby(
216  complex<double> const &a,
217  w_vector<complex<double> const> *x,
218  complex<double> const &b,
219  w_vector<complex<double>> *y) {
220  return gsl_vector_complex_axpby(a, x, b, y);
221 }
222 
223 
224 /// Perform the logical equivalent of `y = a*x + b*y`.
225 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
226 ///
227 /// @param a Coefficient of vector `x`.
228 /// @param x Pointer to vector that is multiplied by `a`.
229 /// @param b Coefficient of vector `y`.
230 /// @param y Pointer to vector that is multiplied by `b` and then updated as
231 /// `a*x + b*y`.
232 /// @return TBD: GSL's documentation does not specify.
233 inline int w_axpby(
234  complex<float> const &a,
235  w_vector<complex<float> const> *x,
236  complex<float> const &b,
237  w_vector<complex<float>> *y) {
238  return gsl_vector_complex_float_axpby(a, x, b, y);
239 }
240 
241 
242 /// Perform the logical equivalent of `y = a*x + b*y`.
243 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_axpby
244 ///
245 /// @param a Coefficient of vector `x`.
246 /// @param x Pointer to vector that is multiplied by `a`.
247 /// @param b Coefficient of vector `y`.
248 /// @param y Pointer to vector that is multiplied by `b` and then updated as
249 /// `a*x + b*y`.
250 /// @return TBD: GSL's documentation does not specify.
251 inline int w_axpby(
252  complex<long double> const &a,
253  w_vector<complex<long double> const> *x,
254  complex<long double> const &b,
255  w_vector<complex<long double>> *y) {
256  return gsl_vector_complex_long_double_axpby(a, x, b, y);
257 }
258 
259 
260 } // namespace gsl
261 
262 // EOF
gsl::w_axpby
int w_axpby(long double const &a, w_vector< long double const > *x, long double const &b, w_vector< long double > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:56
gsl::w_axpby
int w_axpby(unsigned short const &a, w_vector< unsigned short const > *x, unsigned short const &b, w_vector< unsigned short > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:161
gsl::w_axpby
int w_axpby(complex< double > const &a, w_vector< complex< double > const > *x, complex< double > const &b, w_vector< complex< double >> *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:215
gsl::w_axpby
int w_axpby(float const &a, w_vector< float const > *x, float const &b, w_vector< float > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:38
gsl::w_axpby
int w_axpby(short const &a, w_vector< short const > *x, short const &b, w_vector< short > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:143
gsl::w_axpby
int w_axpby(unsigned const &a, w_vector< unsigned const > *x, unsigned const &b, w_vector< unsigned > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:89
gsl::w_axpby
int w_axpby(int const &a, w_vector< int const > *x, int const &b, w_vector< int > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:75
gsl::w_axpby
int w_axpby(complex< long double > const &a, w_vector< complex< long double > const > *x, complex< long double > const &b, w_vector< complex< long double >> *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:251
gsl::w_axpby
int w_axpby(complex< float > const &a, w_vector< complex< float > const > *x, complex< float > const &b, w_vector< complex< float >> *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:233
gsl::w_axpby
int w_axpby(double const &a, w_vector< double const > *x, double const &b, w_vector< double > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:20
gsl::w_axpby
int w_axpby(unsigned long const &a, w_vector< unsigned long const > *x, unsigned long const &b, w_vector< unsigned long > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:125
gsl::w_axpby
int w_axpby(unsigned char const &a, w_vector< unsigned char const > *x, unsigned char const &b, w_vector< unsigned char > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:197
gsl::w_axpby
int w_axpby(long const &a, w_vector< long const > *x, long const &b, w_vector< long > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:107
gsl::w_axpby
int w_axpby(char const &a, w_vector< char const > *x, char const &b, w_vector< char > *y)
Perform the logical equivalent of y = a*x + b*y.
Definition: axpby.hpp:179
gsl
Namespace for C++-interface to GSL.
Definition: v-iface.hpp:51