Qx v0.5.8
Qt Extensions Library
Loading...
Searching...
No Matches
qx-algorithm.h File Reference

The qx-algorithm header file provides various mathematical/algorithmic functions. More...

#include "qx/core/qx_core_export.h"
#include <stdexcept>
#include <unordered_set>
#include <QtGlobal>
#include "qx/utility/qx-concepts.h"
Include dependency graph for qx-algorithm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Qx
 The Qx namespace is the main namespace through which all non-global functionality of the Qx library is accessed.
 

Functions

int Qx::abs (int n)
 
long long Qx::abs (long long n)
 
long Qx::abs (long n)
 
unsigned int Qx::abs (unsigned int n)
 
unsigned long long Qx::abs (unsigned long long n)
 
unsigned long Qx::abs (unsigned long n)
 
template<typename T >
requires std::integral<T>
Qx::ceilNearestMultiple (T num, T mult)
 
template<typename T >
requires std::integral<T>
Qx::ceilPowOfTwo (T num)
 
template<typename T >
requires std::unsigned_integral<T>
Qx::constrainedAdd (T a, T b, T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::signed_integral<T>
Qx::constrainedAdd (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::unsigned_integral<T>
Qx::constrainedDiv (T a, T b, T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::signed_integral<T>
Qx::constrainedDiv (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::unsigned_integral<T>
Qx::constrainedMult (T a, T b, T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::signed_integral<T>
Qx::constrainedMult (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::unsigned_integral<T>
Qx::constrainedSub (T a, T b, T min=0)
 
template<typename T >
requires std::signed_integral<T>
Qx::constrainedSub (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<class InputIt >
requires std::input_iterator<InputIt> && std::equality_comparable<InputIt>
bool Qx::containsDuplicates (InputIt begin, InputIt end)
 
template<typename T >
requires arithmetic<T>
Qx::distance (T x, T y)
 
template<typename T >
requires std::integral<T>
Qx::floorNearestMultiple (T num, T mult)
 
template<typename T >
requires std::integral<T>
Qx::floorPowOfTwo (T num)
 
template<typename T >
requires arithmetic<T>
bool Qx::isEven (T num)
 
template<typename T >
requires arithmetic<T>
bool Qx::isOdd (T num)
 
template<typename T >
requires std::integral<T>
Qx::length (T start, T end)
 
template<typename T >
requires std::integral<T>
Qx::roundPowOfTwo (T num)
 
template<typename T >
requires std::integral<T>
Qx::roundToNearestMultiple (T num, T mult)