From d9ddfeeaea3cdb410888f5c13ad1f90606e122c7 Mon Sep 17 00:00:00 2001 From: evomarc Date: Mon, 21 May 2001 04:10:55 +0000 Subject: [PATCH] Normalized real_value --- eo/test/real_value.h | 2 +- eo/test/t-eoESAll.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eo/test/real_value.h b/eo/test/real_value.h index 8f3a0df5..8bedd6b9 100644 --- a/eo/test/real_value.h +++ b/eo/test/real_value.h @@ -12,7 +12,7 @@ double real_value(const std::vector& _ind) double sum = 0; for (unsigned i = 0; i < _ind.size(); i++) sum += _ind[i] * _ind[i]; - return sqrt(sum); + return sum/_ind.size(); } diff --git a/eo/test/t-eoESAll.cpp b/eo/test/t-eoESAll.cpp index f673eaf7..adf2aace 100644 --- a/eo/test/t-eoESAll.cpp +++ b/eo/test/t-eoESAll.cpp @@ -2,7 +2,7 @@ #ifdef _MSC_VER #pragma warning(disable:4786) -#endif +#endif #include #include