gslcpp
Modern-C++ Wrapper for GSL
max.hpp
Go to the documentation of this file.
1 /// \file include/gslcpp/wrap/max.hpp
2 /// \copyright 2022 Thomas E. Vaughan, all rights reserved.
3 /// \brief Definition of gsl::w_max().
4 
5 #pragma once
6 #include "container.hpp" // w_vector // vector
7 
8 namespace gsl {
9 
10 
11 /// Maximum value in vector `v`.
12 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
13 /// @param v Pointer to vector.
14 /// @return Maximum value in `v`.
15 inline auto w_max(w_vector<double const> *v) { return gsl_vector_max(v); }
16 
17 
18 /// Maximum value in vector `v`.
19 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
20 /// @param v Pointer to vector.
21 /// @return Maximum value in `v`.
22 inline auto w_max(w_vector<float const> *v) { return gsl_vector_float_max(v); }
23 
24 
25 /// Maximum value in vector `v`.
26 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
27 /// @param v Pointer to vector.
28 /// @return Maximum value in `v`.
29 inline auto w_max(w_vector<long double const> *v) {
30  return gsl_vector_long_double_max(v);
31 }
32 
33 
34 /// Maximum value in vector `v`.
35 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
36 /// @param v Pointer to vector.
37 /// @return Maximum value in `v`.
38 inline auto w_max(w_vector<int const> *v) { return gsl_vector_int_max(v); }
39 
40 
41 /// Maximum value in vector `v`.
42 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
43 /// @param v Pointer to vector.
44 /// @return Maximum value in `v`.
45 inline auto w_max(w_vector<unsigned const> *v) {
46  return gsl_vector_uint_max(v);
47 }
48 
49 
50 /// Maximum value in vector `v`.
51 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
52 /// @param v Pointer to vector.
53 /// @return Maximum value in `v`.
54 inline auto w_max(w_vector<long const> *v) { return gsl_vector_long_max(v); }
55 
56 
57 /// Maximum value in vector `v`.
58 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
59 /// @param v Pointer to vector.
60 /// @return Maximum value in `v`.
61 inline auto w_max(w_vector<unsigned long const> *v) {
62  return gsl_vector_ulong_max(v);
63 }
64 
65 
66 /// Maximum value in vector `v`.
67 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
68 /// @param v Pointer to vector.
69 /// @return Maximum value in `v`.
70 inline auto w_max(w_vector<short const> *v) { return gsl_vector_short_max(v); }
71 
72 
73 /// Maximum value in vector `v`.
74 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
75 /// @param v Pointer to vector.
76 /// @return Maximum value in `v`.
77 inline auto w_max(w_vector<unsigned short const> *v) {
78  return gsl_vector_ushort_max(v);
79 }
80 
81 
82 /// Maximum value in vector `v`.
83 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
84 /// @param v Pointer to vector.
85 /// @return Maximum value in `v`.
86 inline auto w_max(w_vector<char const> *v) { return gsl_vector_char_max(v); }
87 
88 
89 /// Maximum value in vector `v`.
90 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_max
91 /// @param v Pointer to vector.
92 /// @return Maximum value in `v`.
93 inline auto w_max(w_vector<unsigned char const> *v) {
94  return gsl_vector_uchar_max(v);
95 }
96 
97 
98 } // namespace gsl
99 
100 // EOF
gsl::w_max
auto w_max(w_vector< double const > *v)
Maximum value in vector v.
Definition: max.hpp:15
gsl::w_max
auto w_max(w_vector< unsigned short const > *v)
Maximum value in vector v.
Definition: max.hpp:77
gsl::w_max
auto w_max(w_vector< short const > *v)
Maximum value in vector v.
Definition: max.hpp:70
gsl::w_max
auto w_max(w_vector< unsigned const > *v)
Maximum value in vector v.
Definition: max.hpp:45
gsl::w_max
auto w_max(w_vector< unsigned char const > *v)
Maximum value in vector v.
Definition: max.hpp:93
gsl::w_max
auto w_max(w_vector< int const > *v)
Maximum value in vector v.
Definition: max.hpp:38
gsl::w_max
auto w_max(w_vector< float const > *v)
Maximum value in vector v.
Definition: max.hpp:22
gsl::w_max
auto w_max(w_vector< long double const > *v)
Maximum value in vector v.
Definition: max.hpp:29
gsl::w_max
auto w_max(w_vector< long const > *v)
Maximum value in vector v.
Definition: max.hpp:54
gsl::w_max
auto w_max(w_vector< char const > *v)
Maximum value in vector v.
Definition: max.hpp:86
gsl
Namespace for C++-interface to GSL.
Definition: v-iface.hpp:51
gsl::w_max
auto w_max(w_vector< unsigned long const > *v)
Maximum value in vector v.
Definition: max.hpp:61