Useful math equations in CCGL. More...
Go to the source code of this file.
Namespaces | |
namespace | ccgl |
Common Cross-platform Geographic Library (CCGL) | |
namespace | ccgl::utils_math |
Basic mathematics related functions. | |
Functions | |
template<typename T1 , typename T2 > | |
bool | ccgl::utils_math::FloatEqual (T1 v1, T2 v2) |
Whether v1 is equal to v2. More... | |
float | ccgl::utils_math::Expo (float xx, float upper=20.f, float lower=-20.f) |
Check the argument against upper and lower boundary values prior to doing Exponential function. | |
float | ccgl::utils_math::Power (float a, float n) |
deal with positive and negative float numbers | |
template<typename T > | |
T | ccgl::utils_math::MaxInArray (const T *a, int n) |
Get maximum value in a numeric array with size n. More... | |
template<typename T > | |
T | ccgl::utils_math::MinInArray (const T *a, int n) |
Get minimum value in a numeric array with size n. More... | |
template<typename T > | |
bool | ccgl::utils_math::IsVectorAllSame (const vector< T > *a, T value) |
template<typename T > | |
bool | ccgl::utils_math::IsValueInVector (const vector< T > *a, T value) |
template<typename T > | |
T | ccgl::utils_math::Sum (int row, const T *data) |
Sum of a numeric array Get sum value of a double array with size row. More... | |
template<typename T > | |
T | ccgl::utils_math::Sum (int row, int *&idx, const T *data) |
Sum of a numeric array Get sum value of a double array with size row and real index idx. More... | |
template<typename T > | |
void | ccgl::utils_math::BasicStatistics (const T *values, int num, double **derivedvalues, T exclude=static_cast< T >(NODATA_VALUE)) |
calculate basic statistics at one time_funcs More... | |
template<typename T > | |
void | ccgl::utils_math::BasicStatistics (const T *const *values, int num, int lyrs, double ***derivedvalues, T exclude=static_cast< T >(NODATA_VALUE)) |
calculate basic statistics at one time_funcs for 2D raster data More... | |
float | ccgl::utils_math::ApprSqrt (float z) |
approximate sqrt More... | |
double | ccgl::utils_math::ApprSqrt (const double z) |
template<typename T > | |
T | ccgl::utils_math::CalSqrt (T val) |
template<typename T > | |
T | ccgl::utils_math::CalExp (T val) |
float | ccgl::utils_math::ApprLn (float z) |
Approximates the natural logarithm, (where the base is 'e'=2.71828) | |
double | ccgl::utils_math::ApprLn (const double z) |
template<typename T > | |
T | ccgl::utils_math::CalLn (T val) |
float | ccgl::utils_math::pow_lookup (const float exp, const float log_base) |
lookup for pow(a, b) function More... | |
float | ccgl::utils_math::ApprPow (float a, float b) |
Approximates pow(a, b) based on the work of Harrison Ainsworth. More... | |
template<typename T1 , typename T2 > | |
double | ccgl::utils_math::CalPow (T1 a, T2 b) |
template<typename T > | |
bool | ccgl::utils_math::IsValueInVectorVector (const vector< vector< T > > *a, T value) |
Useful math equations in CCGL.