diff --git a/eo/src/eoRanking.h b/eo/src/eoRanking.h index c1c3d1e74..a8e6b69d1 100644 --- a/eo/src/eoRanking.h +++ b/eo/src/eoRanking.h @@ -81,7 +81,7 @@ public: value().resize(pSize); double beta = (2 - pressure) / pSize; - if (exponent == 1.0) // no need for exponetial then + if (exponent == 1.0) // no need for exponential then { double alpha = (2 * pressure - 2) / (pSize * pSizeMinusOne); for (unsigned i = 0; i < pSize; i++) @@ -96,7 +96,7 @@ public: for (unsigned i = 0; i < pSize; i++) { int which = lookfor(rank[i], _pop); - // value in in [0,1] + // value is in [0,1] double tmp = ((double)(pSize - i)) / pSize; // to the exponent, and back to [m,M] value()[which] = gamma * pow(tmp, exponent) + beta; diff --git a/eo/src/eoRankingCached.h b/eo/src/eoRankingCached.h index 98a03115d..65b8c5fce 100644 --- a/eo/src/eoRankingCached.h +++ b/eo/src/eoRankingCached.h @@ -101,7 +101,7 @@ public: indexMap[&_pop[i]] = i; } - if (exponent == 1.0) // no need for exponetial then (linear case) + if (exponent == 1.0) // no need for exponential then (linear case) { for (unsigned i = 0; i < pSize; i++) { @@ -116,7 +116,7 @@ public: { const EOT *indiv = rank[i]; int which = indexMap[indiv]; - // value in in [0,1] + // value is in [0,1] double tmp = ((double)(pSize - i)) / pSize; // to the exponent, and back to [m,M] value()[which] = cached_gamma * pow(tmp, exponent) + cached_beta;