20 template <
typename T,
int N>
21 static constexpr int constDim(
const T(&)[N]) {
return N; }
23 template <
typename T,
int N>
24 static int indexOf(
const T(&array) [N],
const T query)
26 for(
int i = 0; i < N; i++)
33 template<
typename T,
int N>
35 static T
maxOf(
const T(&array) [N])
39 for(
int i = 1; i < N; i++)
46 template<
typename T,
int N>
48 static T
minOf(
const T(&array) [N])
52 for(
int i = 1; i < N; i++)
59 template<
typename T,
int N>
71 for(
int i = 0; i < N; i++)
76 T maxFreqVal = array[0];
77 QHashIterator<T,int> i(hash);
82 if(maxFreq < i.value())
The Array class is a collection of static functions pertaining to C-style arrays.
Definition qx-array.h:17
static constexpr int constDim(const T(&)[N])
Definition qx-array.h:21
static T maxOf(const T(&array)[N])
Definition qx-array.h:35
static T mostFrequent(const T(&array)[N])
Definition qx-array.h:60
static T minOf(const T(&array)[N])
Definition qx-array.h:48
static int indexOf(const T(&array)[N], const T query)
Definition qx-array.h:24
Specifies that a type is an arithmetic type.
Definition qx-concepts.h:490
The Qx namespace is the main namespace through which all non-global functionality of the Qx library i...
Definition qx-abstracterror.cpp:13
The qx-concepts header file provides a library of general purpose concepts as an extension of the sta...