explicit parenthesis for the assert in edoSamplerUniform

This commit is contained in:
nojhan 2011-10-19 11:32:20 +02:00
commit c0ba29d4a3

View file

@ -37,6 +37,12 @@ Authors:
* edoSamplerUniform
* This class uses the Uniform distribution parameters (bounds) to return
* a random position used for population sampling.
*
* Returns a random number in [min,max[ for each variable defined by the given
* distribution.
*
* Note: if the distribution given at call defines a min==max for one of the
* variable, the result will be the same number.
*/
template < typename EOT, class D = edoUniform<EOT> >
class edoSamplerUniform : public edoSampler< D >
@ -63,7 +69,7 @@ public:
double max = distrib.max()[i];
double random = rng.uniform(min, max);
assert( min == random && random == max || min <= random && random < max); // random in [ min, max [
assert( ( min == random && random == max ) || ( min <= random && random < max) ); // random in [ min, max [
solution.push_back(random);
}