28 #ifndef GUM_GAMMA_LOG2_H 29 #define GUM_GAMMA_LOG2_H 31 #define USE_MATH_DEFINES_ 36 #include <agrum/agrum.h> 37 #include <agrum/tools/core/math/math_utils.h> 58 GammaLog2(
bool requires_precision =
false);
127 #ifndef GUM_NO_INLINE 128 # include <agrum/tools/core/math/gammaLog2_inl.h> double gammaLog2(double x) const
Returns log2 ( gamma (x) ) for x >= 0.
The class for computing Log2 (Gamma(x))
INLINE void emplace(Args &&... args)
static constexpr double _inv_log2_
The value of 1 / std::log(2).
void setPrecision(bool p)
Sets whether we need more precision for small values.
GammaLog2(bool requires_precision=false)
Default constructor.
GammaLog2(const GammaLog2 &from)
Copy constructor.
static const std::vector< double > _small_values_
The 5000 values from 0 to 50 by step of 1/100.
bool _requires_precision_
Indicates whether we need more precision for small values.
double operator()(double x) const
Returns log2 ( gamma (x) ) for x > 0.
GammaLog2(GammaLog2 &&from)
Move constructor.
~GammaLog2()
Class destructor.
static constexpr double _log_sqrt_2pi_
The value of std::log ( std::sqrt(2pi) ).