28 #ifndef GUM_LEARNING_DIRICHLET_H 29 #define GUM_LEARNING_DIRICHLET_H 34 #include <agrum/agrum.h> 35 #include <agrum/tools/core/utils_random.h> 128 template <
class URNG >
148 void param(
const param_type& p);
156 float min()
const noexcept;
164 float max()
const noexcept;
183 #ifndef GUM_NO_INLINE 184 # include <agrum/tools/core/math/Dirichlet_inl.h> 188 #include <agrum/tools/core/math/Dirichlet_tpl.h> void param(const param_type &p)
Sets the parameters of the distribution.
A class for sampling w.r.t.
INLINE void emplace(Args &&... args)
const param_type & param() const noexcept
Returns the parameters of the distribution.
std::gamma_distribution< float > _gamma_
The gamma distribution used to compute the Dirichlet unnormalized samples.
param_type _params_
The parameters of the distribution.
Dirichlet & operator=(Dirichlet &&from)
Move operator.
Dirichlet(const param_type ¶ms, unsigned int seed=GUM_RANDOMSEED)
Default constructor.
result_type operator()(URNG &generator, const param_type &p)
Returns a sample from the Dirichlet distribution.
float min() const noexcept
Returns the greatest lower bound of the range of values returned by gum::Dirichlet::operator()().
Dirichlet(const Dirichlet &from)
Copy constructor.
Dirichlet(Dirichlet &&from)
Move constructor.
float max() const noexcept
Returns the lowest higher bound of the range of values returned by gum::Dirichlet::operator()().
~Dirichlet()
Class destructor.
result_type operator()(const param_type &p)
Returns a sample from the Dirichlet distribution.
std::default_random_engine _generator_
The random engine used by the unform random distribution.
result_type operator()()
Returns a sample from the Dirichlet distribution.
Dirichlet & operator=(const Dirichlet &from)
Copy operator.