git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1562 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
2148721ad6
commit
0662f1cc4e
6 changed files with 349 additions and 26 deletions
|
|
@ -81,36 +81,18 @@ public:
|
|||
*/
|
||||
void operator()(eoPop < MOEOT > & _src, std::vector <unsigned int> _select, eoPop < MOEOT > & _dest)
|
||||
{
|
||||
if(number > 0){
|
||||
for(unsigned int i=0; i<_select.size(); i++)
|
||||
explore(_src[_select[i]], _dest);
|
||||
}
|
||||
for(unsigned int i=0; i<_select.size(); i++)
|
||||
explore(_src[_select[i]], _dest);
|
||||
}
|
||||
|
||||
private:
|
||||
protected:
|
||||
|
||||
/**
|
||||
* explorer of one individual
|
||||
* @param _src the individual to explore
|
||||
* @param _dest contains new generated individuals
|
||||
*/
|
||||
void explore(MOEOT & _src, eoPop < MOEOT > & _dest)
|
||||
{
|
||||
unsigned int tmp = number;
|
||||
moveInit(move, _src);
|
||||
do
|
||||
{
|
||||
objVec = incrEval(move, _src);
|
||||
_dest.push_back(_src);
|
||||
move(_dest.back());
|
||||
_dest.back().objectiveVector(objVec);
|
||||
_dest.back().flag(0);
|
||||
tmp--;
|
||||
}
|
||||
while (nextMove(move, _src) && (tmp > 0));
|
||||
if(!nextMove(move, _src))
|
||||
_src.flag(1);
|
||||
}
|
||||
virtual void explore(MOEOT & _src, eoPop < MOEOT > & _dest) = 0;
|
||||
|
||||
/** Move */
|
||||
Move move;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue