bugfix assert was too restrictive in the uniform sampler, when min==max, the number drawn can be <= max
This commit is contained in:
parent
99d1a08e7c
commit
ea98e9b3f4
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ public:
|
||||||
double max = distrib.max()[i];
|
double max = distrib.max()[i];
|
||||||
double random = rng.uniform(min, max);
|
double random = rng.uniform(min, max);
|
||||||
|
|
||||||
assert( min < random && random < max);
|
assert( min == random && random == max || min <= random && random < max); // random in [ min, max [
|
||||||
|
|
||||||
solution.push_back(random);
|
solution.push_back(random);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue