paradiseo new mo added
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1712 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
e2546ca8d5
commit
d7496cafff
116 changed files with 12034 additions and 0 deletions
33
trunk/paradiseo-mo/tutorial/oneMax/src/bitMove_next.h
Normal file
33
trunk/paradiseo-mo/tutorial/oneMax/src/bitMove_next.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "bitMove_next.h"
|
||||
|
||||
#ifndef __bitMove_next_h
|
||||
#define __bitMove_next_h
|
||||
|
||||
#include <move/moNextMove.h>
|
||||
#include "bitMove.h"
|
||||
|
||||
template <class EOT>
|
||||
class BitMove_next : public moNextMove < BitMove<EOT> > {
|
||||
|
||||
public:
|
||||
BitMove_next()
|
||||
{
|
||||
};
|
||||
|
||||
bool operator () (BitMove<EOT> & __move, const EOT & genome) {
|
||||
|
||||
if (__move.bit >= (genome.size() - 1)){
|
||||
return false ;
|
||||
}
|
||||
else {
|
||||
__move.bit++;
|
||||
return true ;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue