Added bounds to the real operators in make_XXX (and hence in t-eoReal)

This commit is contained in:
evomarc 2001-04-28 05:47:18 +00:00
commit a7042bffee
16 changed files with 330 additions and 181 deletions

View file

@ -2,17 +2,17 @@
//-----------------------------------------------------------------------------
/** Just a simple function that takes an eoEsBase<float> and sets the fitnes
/** Just a simple function that takes an eoEsBase<double> and sets the fitnes
to sphere
@param _ind A floatingpoint vector
@param _ind vector<double>
*/
double real_value(const std::vector<double>& _ind)
{
double sum = 0; /* compute in double format, even if return a float */
double sum = 0;
for (unsigned i = 0; i < _ind.size(); i++)
sum += _ind[i] * _ind[i];
return sum;
return sqrt(sum);
}