![]() |
aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
|
Useful macros for maths. More...
#include <cmath>#include <limits>#include <agrum/base/core/configuration/configuration.h>#include <agrum/base/core/math/math_utils_tpl.h>Go to the source code of this file.
Namespaces | |
| namespace | gum |
| gum is the global namespace for all aGrUM entities | |
Macros | |
| #define | M_LOG2E 1.4426950408889634074 |
| #define | M_PI 3.14159265358979323846 |
| #define | M_LN2 0.69314718055994530942 |
| #define | GUM_LOG_SQRT_2PI .91893853320467274177 |
| #define | GUM_LOG2_OR_0(x) |
Functions | |
| template<typename T> | |
| bool | gum::isCloseToZero (T x, T tol=static_cast< T >(config().epsilonFine())) |
| Is |x| <= tol ? By default, tol is the key core.epsilonFine of the configuration. | |
| template<typename T> | |
| bool | gum::isCloseToOne (T x, T tol=static_cast< T >(config().epsilonFine())) |
| Is |x - 1| <= tol ? By default, tol is the key core.epsilonFine of the configuration. | |
| template<typename T> | |
| bool | gum::isfinite (T arg) |
Useful macros for maths.
Definition in file math_utils.h.
| #define GUM_LOG2_OR_0 | ( | x | ) |
Definition at line 72 of file math_utils.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::entropyXgivenY(), gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::entropyXgivenYZ(), gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::entropyXgivenZ(), gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::entropyXYgivenZ(), gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::entropyYgivenX(), gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::entropyYgivenZ(), gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::mutualInformationXY(), gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::mutualInformationXYgivenZ(), gum::Tensor< GUM_ELEMENT >::variance(), and gum::InformationTheory< INFERENCE_ENGINE, GUM_SCALAR >::variationOfInformationXY().
| #define GUM_LOG_SQRT_2PI .91893853320467274177 |
Definition at line 69 of file math_utils.h.
| #define M_LN2 0.69314718055994530942 |
Definition at line 65 of file math_utils.h.
Referenced by gum::VariableLog2ParamComplexity::CnrToFile(), gum::learning::Miic::findBestContributor_(), and gum::VariableLog2ParamComplexity::log2Cnr().
| #define M_LOG2E 1.4426950408889634074 |
Definition at line 57 of file math_utils.h.
| #define M_PI 3.14159265358979323846 |
Definition at line 61 of file math_utils.h.