From ca452b8c0b37ccecfbf802fc78de7b2fc5c67f84 Mon Sep 17 00:00:00 2001 From: jhumeau Date: Thu, 29 Jan 2009 16:20:25 +0000 Subject: [PATCH] Add a flag in MOEO.h git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1374 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-moeo/src/core/MOEO.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/trunk/paradiseo-moeo/src/core/MOEO.h b/trunk/paradiseo-moeo/src/core/MOEO.h index ff9538a28..5807abe4a 100644 --- a/trunk/paradiseo-moeo/src/core/MOEO.h +++ b/trunk/paradiseo-moeo/src/core/MOEO.h @@ -115,6 +115,7 @@ class MOEO : public EO < MOEOObjectiveVector > diversityValue = Diversity(); // invalidate all invalidate(); + flag=0; } @@ -274,7 +275,7 @@ class MOEO : public EO < MOEOObjectiveVector > /** - * Returns true if the objective vector of the current solution is smaller than the objective vector of _other on the first objective, + * Returns true if the objective vector of the current solution is smaller than the objective vector of _other on the first objective, * then on the second, and so on (can be usefull for sorting/printing). * You should implement another function in the sub-class of MOEO to have another sorting mecanism. * @param _other the other MOEO object to compare with @@ -332,6 +333,22 @@ class MOEO : public EO < MOEOObjectiveVector > } } + /** + * Setter for "flag" + * @param _flag the flag value + */ + void setFlag(int _flag){ + flag=_flag; + } + + /** + * Getter for "flag" + * @return the flag value + */ + int getFlag(){ + return flag; + } + private: @@ -347,6 +364,8 @@ class MOEO : public EO < MOEOObjectiveVector > Diversity diversityValue; /** true if the diversity value is invalid */ bool invalidDiversityValue; + /** A flag which can be used to stock information*/ + int flag; };