Qx v0.5.8
Qt Extensions Library
|
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"
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> | |
T | Qx::ceilNearestMultiple (T num, T mult) |
template<typename T > requires std::integral<T> | |
T | Qx::ceilPowOfTwo (T num) |
template<typename T > requires std::unsigned_integral<T> | |
T | Qx::constrainedAdd (T a, T b, T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::signed_integral<T> | |
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> | |
T | Qx::constrainedDiv (T a, T b, T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::signed_integral<T> | |
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> | |
T | Qx::constrainedMult (T a, T b, T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::signed_integral<T> | |
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> | |
T | Qx::constrainedSub (T a, T b, T min=0) |
template<typename T > requires std::signed_integral<T> | |
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> | |
T | Qx::distance (T x, T y) |
template<typename T > requires std::integral<T> | |
T | Qx::floorNearestMultiple (T num, T mult) |
template<typename T > requires std::integral<T> | |
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> | |
T | Qx::length (T start, T end) |
template<typename T > requires std::integral<T> | |
T | Qx::roundPowOfTwo (T num) |
template<typename T > requires std::integral<T> | |
T | Qx::roundToNearestMultiple (T num, T mult) |