Début du dev de newMo
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1639 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
25c45dd1fa
commit
e13fd250d1
34 changed files with 1946 additions and 48 deletions
34
branches/newMo/tutorial/oneMax/src/bitMove.h
Normal file
34
branches/newMo/tutorial/oneMax/src/bitMove.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "bitMove.h"
|
||||
|
||||
#ifndef __bitMove
|
||||
#define __bitMove
|
||||
|
||||
#include <utility>
|
||||
#include <move/moMove.h>
|
||||
|
||||
template <class EOT>
|
||||
class BitMove : public moMove <EOT> {
|
||||
|
||||
public :
|
||||
|
||||
typedef EOT EOType;
|
||||
|
||||
unsigned bit;
|
||||
|
||||
BitMove() {
|
||||
bit = 0;
|
||||
}
|
||||
|
||||
BitMove(unsigned _bit) : bit(_bit) { }
|
||||
|
||||
|
||||
void operator () (EOT & chrom)
|
||||
{
|
||||
chrom[bit] = !chrom[bit];
|
||||
};
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue