gslcpp
Modern-C++ Wrapper for GSL
sub.hpp
Go to the documentation of this file.
1 /// \file include/gslcpp/wrap/sub.hpp
2 /// \copyright 2022 Thomas E. Vaughan, all rights reserved.
3 /// \brief Definition of gsl::w_sub().
4 
5 #pragma once
6 #include "container.hpp" // w_vector
7 
8 namespace gsl {
9 
10 
11 /// For vectors `u` and `v`, obtain effect `u = u - v`.
12 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
13 /// @param u Pointer to vector from which `u` will be subtracted.
14 /// @param v Pointer to vector to subtract from `u`.
15 /// @return TBD: GSL's documentation does not specify.
16 inline int w_sub(w_vector<double> *u, w_vector<double const> *v) {
17  return gsl_vector_sub(u, v);
18 }
19 
20 
21 /// For vectors `u` and `v`, obtain effect `u = u - v`.
22 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
23 /// @param u Pointer to vector from which `u` will be subtracted.
24 /// @param v Pointer to vector to subtract from `u`.
25 /// @return TBD: GSL's documentation does not specify.
26 inline int w_sub(w_vector<float> *u, w_vector<float const> *v) {
27  return gsl_vector_float_sub(u, v);
28 }
29 
30 
31 /// For vectors `u` and `v`, obtain effect `u = u - v`.
32 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
33 /// @param u Pointer to vector from which `u` will be subtracted.
34 /// @param v Pointer to vector to subtract from `u`.
35 /// @return TBD: GSL's documentation does not specify.
36 inline int w_sub(w_vector<long double> *u, w_vector<long double const> *v) {
37  return gsl_vector_long_double_sub(u, v);
38 }
39 
40 
41 /// For vectors `u` and `v`, obtain effect `u = u - v`.
42 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
43 /// @param u Pointer to vector from which `u` will be subtracted.
44 /// @param v Pointer to vector to subtract from `u`.
45 /// @return TBD: GSL's documentation does not specify.
46 inline int w_sub(w_vector<int> *u, w_vector<int const> *v) {
47  return gsl_vector_int_sub(u, v);
48 }
49 
50 
51 /// For vectors `u` and `v`, obtain effect `u = u - v`.
52 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
53 /// @param u Pointer to vector from which `u` will be subtracted.
54 /// @param v Pointer to vector to subtract from `u`.
55 /// @return TBD: GSL's documentation does not specify.
56 inline int w_sub(w_vector<unsigned> *u, w_vector<unsigned const> *v) {
57  return gsl_vector_uint_sub(u, v);
58 }
59 
60 
61 /// For vectors `u` and `v`, obtain effect `u = u - v`.
62 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
63 /// @param u Pointer to vector from which `u` will be subtracted.
64 /// @param v Pointer to vector to subtract from `u`.
65 /// @return TBD: GSL's documentation does not specify.
66 inline int w_sub(w_vector<long> *u, w_vector<long const> *v) {
67  return gsl_vector_long_sub(u, v);
68 }
69 
70 
71 /// For vectors `u` and `v`, obtain effect `u = u - v`.
72 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
73 /// @param u Pointer to vector from which `u` will be subtracted.
74 /// @param v Pointer to vector to subtract from `u`.
75 /// @return TBD: GSL's documentation does not specify.
76 inline int
77 w_sub(w_vector<unsigned long> *u, w_vector<unsigned long const> *v) {
78  return gsl_vector_ulong_sub(u, v);
79 }
80 
81 
82 /// For vectors `u` and `v`, obtain effect `u = u - v`.
83 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
84 /// @param u Pointer to vector from which `u` will be subtracted.
85 /// @param v Pointer to vector to subtract from `u`.
86 /// @return TBD: GSL's documentation does not specify.
87 inline int w_sub(w_vector<short> *u, w_vector<short const> *v) {
88  return gsl_vector_short_sub(u, v);
89 }
90 
91 
92 /// For vectors `u` and `v`, obtain effect `u = u - v`.
93 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
94 /// @param u Pointer to vector from which `u` will be subtracted.
95 /// @param v Pointer to vector to subtract from `u`.
96 /// @return TBD: GSL's documentation does not specify.
97 inline int
98 w_sub(w_vector<unsigned short> *u, w_vector<unsigned short const> *v) {
99  return gsl_vector_ushort_sub(u, v);
100 }
101 
102 
103 /// For vectors `u` and `v`, obtain effect `u = u - v`.
104 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
105 /// @param u Pointer to vector from which `u` will be subtracted.
106 /// @param v Pointer to vector to subtract from `u`.
107 /// @return TBD: GSL's documentation does not specify.
108 inline int w_sub(w_vector<char> *u, w_vector<char const> *v) {
109  return gsl_vector_char_sub(u, v);
110 }
111 
112 
113 /// For vectors `u` and `v`, obtain effect `u = u - v`.
114 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
115 /// @param u Pointer to vector from which `u` will be subtracted.
116 /// @param v Pointer to vector to subtract from `u`.
117 /// @return TBD: GSL's documentation does not specify.
118 inline int
119 w_sub(w_vector<unsigned char> *u, w_vector<unsigned char const> *v) {
120  return gsl_vector_uchar_sub(u, v);
121 }
122 
123 
124 /// For vectors `u` and `v`, obtain effect `u = u - v`.
125 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
126 /// @param u Pointer to vector from which `u` will be subtracted.
127 /// @param v Pointer to vector to subtract from `u`.
128 /// @return TBD: GSL's documentation does not specify.
129 inline int
130 w_sub(w_vector<complex<double>> *u, w_vector<complex<double> const> *v) {
131  return gsl_vector_complex_sub(u, v);
132 }
133 
134 
135 /// For vectors `u` and `v`, obtain effect `u = u - v`.
136 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
137 /// @param u Pointer to vector from which `u` will be subtracted.
138 /// @param v Pointer to vector to subtract from `u`.
139 /// @return TBD: GSL's documentation does not specify.
140 inline int
141 w_sub(w_vector<complex<float>> *u, w_vector<complex<float> const> *v) {
142  return gsl_vector_complex_float_sub(u, v);
143 }
144 
145 
146 /// For vectors `u` and `v`, obtain effect `u = u - v`.
147 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_sub
148 /// @param u Pointer to vector from which `u` will be subtracted.
149 /// @param v Pointer to vector to subtract from `u`.
150 /// @return TBD: GSL's documentation does not specify.
151 inline int
152 w_sub(w_vector<complex<long double>> *u,
153  w_vector<complex<long double> const> *v) {
154  return gsl_vector_complex_long_double_sub(u, v);
155 }
156 
157 
158 } // namespace gsl
159 
160 // EOF
gsl::w_sub
int w_sub(w_vector< short > *u, w_vector< short const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:87
gsl::w_sub
int w_sub(w_vector< char > *u, w_vector< char const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:108
gsl::w_sub
int w_sub(w_vector< double > *u, w_vector< double const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:16
gsl::w_sub
int w_sub(w_vector< int > *u, w_vector< int const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:46
gsl::w_sub
int w_sub(w_vector< complex< double >> *u, w_vector< complex< double > const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:130
gsl::w_sub
int w_sub(w_vector< float > *u, w_vector< float const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:26
gsl::w_sub
int w_sub(w_vector< unsigned char > *u, w_vector< unsigned char const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:119
gsl::w_sub
int w_sub(w_vector< unsigned long > *u, w_vector< unsigned long const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:77
gsl::w_sub
int w_sub(w_vector< complex< float >> *u, w_vector< complex< float > const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:141
gsl::w_sub
int w_sub(w_vector< complex< long double >> *u, w_vector< complex< long double > const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:152
gsl::w_sub
int w_sub(w_vector< unsigned short > *u, w_vector< unsigned short const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:98
gsl::w_sub
int w_sub(w_vector< unsigned > *u, w_vector< unsigned const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:56
gsl
Namespace for C++-interface to GSL.
Definition: v-iface.hpp:51
gsl::w_sub
int w_sub(w_vector< long double > *u, w_vector< long double const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:36
gsl::w_sub
int w_sub(w_vector< long > *u, w_vector< long const > *v)
For vectors u and v, obtain effect u = u - v.
Definition: sub.hpp:66