68 __gamma = std::move(from.__gamma);
80 for (
Idx i = 0; i < size; ++i) {
82 std::gamma_distribution< float >::param_type(
__params[i], 1));
87 for (
Idx i = 0; i < size; ++i) {
100 for (
Idx i = 0; i < size; ++i) {
101 __gamma.param(std::gamma_distribution< float >::param_type(parm[i], 1));
106 for (
Idx i = 0; i < size; ++i) {
A class for sampling w.r.t.
const param_type & param() const noexcept
Returns the parameters of the distribution.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Dirichlet(const param_type ¶ms, unsigned int seed=GUM_RANDOMSEED)
Default constructor.
float min() const noexcept
Returns the greatest lower bound of the range of values returned by gum::Dirichlet::operator()().
std::gamma_distribution< float > __gamma
The gamma distribution used to compute the Dirichlet unnormalized samples.
std::vector< float > param_type
The parameter type.
std::vector< float > result_type
The type for the samples generated.
std::default_random_engine __generator
The random engine used by the unform random distribution.
float max() const noexcept
Returns the lowest higher bound of the range of values returned by gum::Dirichlet::operator()().
~Dirichlet()
Class destructor.
std::default_random_engine getRandomGenerator(unsigned int seed)
define a random_engine with correct seed
result_type operator()()
Returns a sample from the Dirichlet distribution.
param_type __params
The parameters of the distribution.
Size Idx
Type for indexes.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Dirichlet & operator=(const Dirichlet &from)
Copy operator.