31 template <
typename GUM_SCALAR >
35 std::vector< GUM_SCALAR > v(n);
39 for (
Idx i = 0; i < n; i++) {
43 s = std::accumulate(v.begin(), v.end(), (GUM_SCALAR)0.0);
45 }
while (s < (GUM_SCALAR)(1e-5));
47 for (
Idx i = 0; i < n; i++) {
std::vector< GUM_SCALAR > randomDistribution(Size n)
Return a random discrete distribution.
double randomProba()
Returns a random double between 0 and 1 included (i.e.
gum is the global namespace for all aGrUM entities
Size Idx
Type for indexes.
std::size_t Size
In aGrUM, hashed values are unsigned long int.