update from constant to function
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@250 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
cefeb2d9ae
commit
c0d4e442a8
1 changed files with 11 additions and 6 deletions
|
|
@ -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) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue