Normalized real_value
This commit is contained in:
parent
9631c9eb11
commit
d9ddfeeaea
2 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ double real_value(const std::vector<double>& _ind)
|
||||||
double sum = 0;
|
double sum = 0;
|
||||||
for (unsigned i = 0; i < _ind.size(); i++)
|
for (unsigned i = 0; i < _ind.size(); i++)
|
||||||
sum += _ind[i] * _ind[i];
|
sum += _ind[i] * _ind[i];
|
||||||
return sqrt(sum);
|
return sum/_ind.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable:4786)
|
#pragma warning(disable:4786)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
Reference in a new issue