![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
The class for computing Log2 (Gamma(x)). More...
#include <agrum/base/core/math/gammaLog2.h>
Public Member Functions | |
Constructors / Destructors | |
| GammaLog2 (bool requires_precision=false) | |
| Default constructor. | |
| GammaLog2 (const GammaLog2 &from) | |
| Copy constructor. | |
| GammaLog2 (GammaLog2 &&from) | |
| Move constructor. | |
| ~GammaLog2 () | |
| Class destructor. | |
Operators | |
| double | operator() (double x) const |
| Returns log2 ( gamma (x) ) for x > 0. | |
| void | setPrecision (bool p) |
| Sets whether we need more precision for small values. | |
| double | gammaLog2 (double x) const |
| Returns log2 ( gamma (x) ) for x >= 0. | |
Private Attributes | |
| bool | _requires_precision_ {false} |
| Indicates whether we need more precision for small values. | |
Static Private Attributes | |
| static constexpr double | _inv_log2_ {M_LOG2E} |
| The value of 1 / std::log(2). | |
| static constexpr double | _log_sqrt_2pi_ {GUM_LOG_SQRT_2PI} |
| The value of std::log ( std::sqrt(2pi) ). | |
| static const std::vector< double > | _small_values_ |
| The 5000 values from 0 to 50 by step of 1/100. | |
The class for computing Log2 (Gamma(x)).
Definition at line 68 of file gammaLog2.h.
|
explicit |
Default constructor.
| requires_precision | Set if precision is required or not. |
Definition at line 58 of file gammaLog2.cpp.
References GammaLog2(), and _requires_precision_.
Referenced by GammaLog2(), GammaLog2(), GammaLog2(), and ~GammaLog2().
| gum::GammaLog2::GammaLog2 | ( | const GammaLog2 & | from | ) |
Copy constructor.
| from | The gum::GammaLog2 to copy. |
Definition at line 63 of file gammaLog2.cpp.
References GammaLog2(), and _requires_precision_.
| gum::GammaLog2::GammaLog2 | ( | GammaLog2 && | from | ) |
Move constructor.
| from | The gum::GammaLog2 to move. |
Definition at line 68 of file gammaLog2.cpp.
References GammaLog2(), and _requires_precision_.
| gum::GammaLog2::~GammaLog2 | ( | ) |
Class destructor.
Definition at line 73 of file gammaLog2.cpp.
References GammaLog2().
Returns log2 ( gamma (x) ) for x >= 0.
| x | A positive double. |
| OutOfBounds | Raised if x <= 0. |
Definition at line 51 of file gammaLog2_inl.h.
References _inv_log2_, _log_sqrt_2pi_, _requires_precision_, _small_values_, and GUM_ERROR.
Referenced by operator()().
Returns log2 ( gamma (x) ) for x > 0.
| OutOfBounds | Raised if raised if x <= 0. |
Definition at line 76 of file gammaLog2_inl.h.
References gammaLog2().
| INLINE void gum::GammaLog2::setPrecision | ( | bool | p | ) |
Sets whether we need more precision for small values.
| p | If true, precision is enable. |
Definition at line 78 of file gammaLog2_inl.h.
References _requires_precision_.
The value of 1 / std::log(2).
Definition at line 137 of file gammaLog2.h.
Referenced by gammaLog2().
|
staticconstexprprivate |
The value of std::log ( std::sqrt(2pi) ).
Definition at line 140 of file gammaLog2.h.
Referenced by gammaLog2().
|
private |
Indicates whether we need more precision for small values.
Definition at line 134 of file gammaLog2.h.
Referenced by GammaLog2(), GammaLog2(), GammaLog2(), gammaLog2(), and setPrecision().
|
staticprivate |
The 5000 values from 0 to 50 by step of 1/100.
Definition at line 143 of file gammaLog2.h.
Referenced by gammaLog2().