Qx v0.5.8
Qt Extensions Library
Loading...
Searching...
No Matches
Qx::Array Class Reference

The Array class is a collection of static functions pertaining to C-style arrays.

#include <qx/core/qx-array.h>

Static Public Member Functions

template<typename T , int N>
static constexpr int constDim (const T(&)[N])
 
template<typename T , int N>
static int indexOf (const T(&array)[N], const T query)
 
template<typename T , int N>
requires arithmetic<T>
static T maxOf (const T(&array)[N])
 
template<typename T , int N>
requires arithmetic<T>
static T minOf (const T(&array)[N])
 
template<typename T , int N>
static T mostFrequent (const T(&array)[N])
 

Member Function Documentation

◆ constDim()

template<typename T , int N>
int Qx::Array::constDim ( const T(&)[N])
inlinestaticconstexpr

Returns the size of the given statically-sized array; therefore, this only works for arrays who's size are determined at compile time.

◆ indexOf()

template<typename T , int N>
int Qx::Array::indexOf ( const T(&) array[N],
const T query )
inlinestatic

Finds and returns the position of query within array, or -1 if it could not be found.

◆ maxOf()

template<typename T , int N>
requires arithmetic<T>
T Qx::Array::maxOf ( const T(&) array[N])
inlinestatic

Returns the highest value in array.

◆ minOf()

template<typename T , int N>
requires arithmetic<T>
T Qx::Array::minOf ( const T(&) array[N])
inlinestatic

Returns the lowest value in array.

◆ mostFrequent()

template<typename T , int N>
T Qx::Array::mostFrequent ( const T(&) array[N])
inlinestatic

Returns the most frequently occurring value of array.


The documentation for this class was generated from the following files: