|
int | binomial (int n, int k) |
| Returns \(n \choose k\). More...
|
|
double | binomial_d (int n, int k) |
| Returns \(n \choose k\). More...
|
|
double | degreesToRadians (const double &angleInDegrees) |
| Converts an angle from degrees to radians. More...
|
|
int | factorial (int n) |
| Returns n! . More...
|
|
double | factorial_d (int n) |
| Returns n! . More...
|
|
int | floorLog2 (int v) |
| A method to obtain the rounded down binary logarithm of v . More...
|
|
template<class T , class INDEX = int> |
T | gcd (const Array< T, INDEX > &numbers) |
| Returns the greatest common divisor of a list of numbers. More...
|
|
template<typename T > |
T | gcd (T a, T b) |
| Returns the greatest common divisor of two numbers. More...
|
|
void | getFraction (double d, int &num, int &denom, const double epsilon=5e-10, const int count=10) |
| Converts a double to a fraction. More...
|
|
double | harmonic (unsigned n) |
| Returns the n-th harmonic number or 1.0 if n < 1. More...
|
|
template<typename T > |
T | lcm (T a, T b) |
| Returns the least common multipler of two numbers. More...
|
|
template<typename T > |
T | log2 (T x) |
| Returns the logarithm of x to the base 2. More...
|
|
double | log4 (double x) |
| Returns the logarithm of x to the base 4. More...
|
|
template<class Container > |
Container::value_type | maxValue (const Container &values) |
| Returns the maximum of an iterable container of given values . More...
|
|
template<class Container > |
double | mean (const Container &values) |
| Returns the mean of an iterable container of given values . More...
|
|
template<class Container > |
Container::value_type | minValue (const Container &values) |
| Returns the minimum of an iterable container of given values . More...
|
|
template<typename T , typename... Args> |
static T | nextPower2 (T arg1, T arg2, Args... args) |
| Returns the smallest power of 2 that is no less than the given (integral) arguments. More...
|
|
template<typename T > |
T | nextPower2 (T x) |
| Returns the smallest power of 2 that is no less than the given (integral) argument. More...
|
|
double | radiansToDegrees (const double &angleInRadians) |
| Converts an angle from radians to degrees. More...
|
|
template<typename T > |
int | sgn (T val) |
| Returns +1 for val > 0, 0 for val = 0, and -1 for val < 0. More...
|
|
template<class Container > |
double | standardDeviation (const Container &values) |
| Returns the standard deviation of an iterable container of given values . More...
|
|
template<class Container > |
double | standardDeviation (const Container &values, double mean) |
| Returns the standard deviation of an iterable container of given values . More...
|
|
template<class Container > |
Container::value_type | sum (const Container &values) |
| Returns the sum of an iterable container of given values . More...
|
|
template<typename T > |
void | updateMax (T &max, const T &newValue) |
| Stores the maximum of max and newValue in max . More...
|
|
template<typename T > |
void | updateMin (T &min, const T &newValue) |
| Stores the minimum of min and newValue in min . More...
|
|
|
constexpr double | gamma = 0.57721566490153286061 |
| The Euler-Mascheroni constant gamma. More...
|
|
const double | log_of_4 = log(4.0) |
| The constant log(4.0). More...
|
|
constexpr double | one_rad = 57.29577951308232087679 |
| The constant \(\frac{180}{\pi}\). More...
|
|
constexpr double | pi = 3.14159265358979323846 |
| The constant \(\pi\). More...
|
|
constexpr double | pi_180 = 0.01745329251994329576 |
| The constant \(\frac{\pi}{180}\). More...
|
|
constexpr double | pi_2 = 1.57079632679489661923 |
| The constant \(\frac{\pi}{2}\). More...
|
|