diff --git a/branches/paradiseo-moeo-1.0/src/metric/moeoNormalizedSolutionVsSolutionBinaryMetric.h b/branches/paradiseo-moeo-1.0/src/metric/moeoNormalizedSolutionVsSolutionBinaryMetric.h index 34ca3fb0f..be9e6659c 100644 --- a/branches/paradiseo-moeo-1.0/src/metric/moeoNormalizedSolutionVsSolutionBinaryMetric.h +++ b/branches/paradiseo-moeo-1.0/src/metric/moeoNormalizedSolutionVsSolutionBinaryMetric.h @@ -27,10 +27,6 @@ class moeoNormalizedSolutionVsSolutionBinaryMetric : public moeoSolutionVsSoluti { public: - /** very small value to avoid the extreme case where the min bound == the max bound */ - const static double tiny = 1e-6; - - /** * Default ctr for any moeoNormalizedSolutionVsSolutionBinaryMetric object */ @@ -50,8 +46,8 @@ public: { if (_min == _max) { - _min -= tiny; - _max += tiny; + _min -= tiny(); + _max += tiny(); } bounds[_obj] = eoRealInterval(_min, _max); } @@ -67,6 +63,15 @@ public: } + /** + * Returns a very small value that can be used to avoid extreme cases (where the min bound == the max bound) + */ + static double tiny() + { + return 1e-6; + } + + protected: /** the bounds for every objective (bounds[i] = bounds for the objective i) */